No resource identifier found for attribute ‘style’ in package ‘android’

Getting the above error? Get ready to kick yourself.

You don’t need to specify the ‘android’ namespace. So the following is correct:

<TextView style="@style/Subheading" />

While the following is not:

<TextView android:style="@style/Subheading"/>

11 comments

very helpful thank you

Thanks! Quick and easy find 🙂

Thanks for the solution dude. It work perfectly for me.

Great, thank you. Seems strange but I’m sure it’ll make sense when I get better with Android.

This simple, Thanks! 😀

Hi,

Also you can use it like this:
style=”@android:style/Widget.ProgressBar.Small”

It Works

Gabriel Alexandre

Thank you very much 🙂

Brilliant, tanks mate!

Leave a Reply