Open mvysny opened 7 years ago
I'm using the following theme for the activity: Theme.AppCompat.Light.DarkActionBar
Just got another one, similar:
Caused by java.lang.RuntimeException: Failed to resolve attribute at index 96
at android.content.res.TypedArray.getColor(TypedArray.java:401)
at android.widget.TextView.<init>(TextView.java:717)
at android.widget.TextView.<init>(TextView.java:648)
at android.widget.TextView.<init>(TextView.java:644)
at android.widget.TextView.<init>(TextView.java:640)
at org.jetbrains.anko.$$Anko$Factories$Sdk15View$TEXT_VIEW$1.invoke(Views.kt:52)
at org.jetbrains.anko.$$Anko$Factories$Sdk15View$TEXT_VIEW$1.invoke(Views.kt:13)
This happened on ASUS_Z00ED Android 5.0.2, when trying to use streamName = textView(R.style.TextAppearance_AppCompat_Title_Inverse) { ... }
. The activity extends AppCompatActivity
and should have the following theme Theme.AppCompat.Light.DarkActionBar
. It seems that Android inflater contains some patches regarding this that Anko can't possibly contain, so I'll avoid using broken Android theming from now on.
When using the following code:
(that is, trying to set theme to one of the Compat styles), I often receive the following exception:
Am I correctly setting the theme parameter?