Can someone please explain to me why I am getting this warning in Android Studio 1.1.0:
Unknown attribute style
Full warning: The inspection highlights unknown XML attributes in Android resource files and AndroidManifest.xml
Here is the code snippet:
<fragment
android:id="@+id/frag_logo"
tools:layout="@layout/fragment_logo"
style="@style/FragmentLogo"/>
The warning occurs on the style attribute.
I am using gradle and android build tools 21.1.2
The style attribute is supported for Views (and by inheritance ViewGroups), so fragments don't support it.
For my configuration warning still exists but style works for fragments. Eventually fragments supply View on onCreateView() so style should work.
Android Studio 2.2.3
minSdkVersion 15
targetSdkVersion 25
gradle-2.14.1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With