Android应用程序主题textViewStyle不';我不能打电话

Android应用程序主题textViewStyle不';我不能打电话,android,xml,textview,styles,android-theme,Android,Xml,Textview,Styles,Android Theme,我有这么具体的问题。我正在为所有文本视图应用主题。它出现在预览版上,但当我在手机上运行此应用程序时,我会使用未设置样式的textview。我为其他视图设置的样式正在工作。只有textviewstyle不起作用 在这个示例中,文本视图的颜色在预览中是绿色的,但当我在手机上运行它时,它是黑色的。为什么? style.xml <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item

我有这么具体的问题。我正在为所有文本视图应用主题。它出现在预览版上,但当我在手机上运行此应用程序时,我会使用未设置样式的textview。我为其他视图设置的样式正在工作。只有textviewstyle不起作用

在这个示例中,文本视图的颜色在预览中是绿色的,但当我在手机上运行它时,它是黑色的。为什么?

style.xml

 <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:textViewStyle">@style/myTextViewStyle</item>
    <item name="android:buttonStyle">@style/myButtonStyle</item>
    <item name="android:editTextStyle">@style/myEditTextStyle</item>
    <!-- Customize your theme here. -->
</style>

<style name="myTextViewStyle" parent="@android:style/Widget.TextView">
    <item name="android:textColor">#00ff00</item>
    <item name="android:textSize">24sp</item>
</style>

<style name="myButtonStyle" parent="@android:style/Widget.Button">
    <item name="android:textColor">#00ff00</item>
    <item name="android:textSize">24sp</item>
</style>

<style name="myEditTextStyle" parent="@android:style/Widget.EditText">
    <item name="android:textColor">#00ff00</item>
    <item name="android:textSize">24sp</item>
</style>

@样式/myTextViewStyle
@样式/我的按钮样式
@样式/myEditTextStyle
#00ff00
24便士
#00ff00
24便士
#00ff00
24便士
activity_main.xml

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/hello_world" />

<Button
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="button" />

<EditText
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="edit text" />

v22.1.1中未定义“textViewStyle”。您可以从以下链接中找到更多详细信息: