I'm trying to upgrade from version 25.3.1
to version 26.X.X
of the support library, but every time I build the project using the newer version I get this error:
Error:(357) Attribute "font" already defined with incompatible format.
Error:(343) Original attribute defined here.
Error:java.util.concurrent.ExecutionException:
com.android.ide.common.process.ProcessException: Error while executing
process /Users/johnsmith/Library/Android/sdk/build-tools/26.0.1/aapt
with arguments {package -f --no-crunch -I ...
I have tried cleaning and rebuilding. I have also tried invalidating caches and restarting Android Studio.
The app builds fine with version 25.3.1
of the support library. I'm using Android Studio 3.0 Beta 2 with version 3.0.0-beta2
of the Android Gradle plugin.
Since this error is:
font
attribute, andaapt
,my guess is that you have defined a custom attribute named font
in your application code that conflicts in some manner with the android
-namespaced font
attribute introduced in Android O. Try renaming or removing that custom attribute.
you should change the "font" attribute name that used in customView
<declare-styleable name="AATextView">
<attr name="font" format="string"/>
</declare-styleable>
for example :
<declare-styleable name="AATextView">
<attr name="typeface" format="string"/>
</declare-styleable>
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