Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AndroidX (fix for sudden build failure - AAPT error resource not found) #138

Open
erobertson42 opened this issue Jun 24, 2019 · 0 comments

Comments

@erobertson42
Copy link

erobertson42 commented Jun 24, 2019

So today I go to build my app, and it fails for no apparent reason - nothing changed but some minor CSS. After a bunch of digging, it looks like on June 17, Google released a new major version (17.0.0) of the Play Services libraries which have breaking changes.

Unfortunately, this caused the xapkreader plugin to fail to build because it has its framework dependency defined too loosely, which causes it to always use the latest available version.

AAPT: error: resource android:attr/fontVariationSettings not found.
AAPT: error: resource android:attr/ttcIndex not found.

Fortunately, the fix is simply to update plugin.xml by replacing the line:

<framework src="com.google.android.gms:play-services-base:+" />

... with ...

<framework src="com.google.android.gms:play-services-base:16.+" />

The main issue is that with version 17 of Play Services, the Android Support libraries are being deprecated in favor of the Jetpack AndroidX libraries. So while the simple fix above works for now, it's more of a stop-gap. Eventually, all Cordova Android plugins using Google Play Services will need to migrate to AndroidX. Unfortunately, that's not something I had time to dive into at the moment, so I'll go with the easy fix for now. :)

(Unrelated to xapkreader, but relevant to the topic, all this also applies to Firebase.)

AlexTolson added a commit to AlexTolson/cordova-plugin-xapkreader that referenced this issue Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant