Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

error: invalid resource type 'attr' for parent of style

After upgrading my Android project to Studio 3.0.1 and Gradle 3.0 I am facing an issue during the build:

MAFLogonUI-3.15.6.aar\\46f903e9d58266c453b893b9caa03deb\\res\\values\\values.xml","position":{"startLine":456,"startColumn":4,"startOffset":32855,"endLine":459,"endColumn":12,"endOffset":33105}}],"original":"","tool":"AAPT"}

I believe the issue is due to the issue referenced here Android help where they state that he @ symbol is suppsed to be omitted when referring to "android". And indeet the generated values.xml file contains:

<style name="SapUexTextAppearance.SlidingTabActive" parent="@android:attr/textAppearanceMedium"> ...

But as this comes from a library that I have included in my build I dunno if I have any control over this. Is there a way to prevent the @ symbols in the generated res/values/value.xml? or will I need an upgrade of my lib?

In the meantime I have disabled AAPT2...

like image 276
hansdampf Avatar asked Dec 19 '22 02:12

hansdampf


1 Answers

Just change @android:attr/textAppearanceMedium to @android:style/TextAppearance.Medium. Starting from Gradle 3 style parents must be styles as well.

like image 80
Alexander Ushakov Avatar answered Dec 30 '22 11:12

Alexander Ushakov