3

We can no longer build our APK with accounts-google. Obviously, this is a serious blocking issue.

This build was working fine as recently as two days ago. Now it would seem that Google have once again broken something.

Steps to produce the issue:

$ meteor create broken-gooogle-oauth-test

$ cd broken-gooogle-oauth-test

$ meteor add-platform android

$ meteor add accounts-google

$ meteor build --verbose ~/test-build --server=http://www.example.com

or...

$ meteor run android-device

Either way, you eventually will see a long list of error messages, starting with:

    /home/mad/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/37baf6a1e42da25347f527a778e640b7/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

    /home/mad/.gradle/caches/transforms-1/files-1.1/core-1.0.0.aar/37baf6a1e42da25347f527a778e640b7/res/values/values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.

    /home/mad/androidTest3/.meteor/local/cordova-build/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:92: error: resource android:attr/fontVariationSettings not found.
    /home/mad/androidTest3/.meteor/local/cordova-build/platforms/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:92: error: resource android:attr/ttcIndex not found.
    error: failed linking references.

    Failed to execute aapt
    com.android.ide.common.process.ProcessException: Failed to execute aapt
        at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
        at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
        at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
        at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
        at sun.reflect.GeneratedMethodAccessor184.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> Failed to execute aapt
2

The cause of this is the June 17th update of the google android libs, which make API 28 the required minimum SDK version. API 28 introduces some new XML attributes, such as ttcIndex and fontVariationSettings referenced in your error.

In this case the plugins in question are com.google.android.gms:play-services-auth and com.google.android.gms:play-services-identity

Unfortunately there isn't an easy way of fixing this, apart from hacking the meteor output in .meteor/local. There are two approaches:

  1. force API 28 (obviously you'll need to download the required API files)
  2. change the :+ version requirement in cordova-plugin-googleplus to the latest version that supports API 27 (e.g., before June 17th).

Option 1 is the cleanest if you can manage it, in .meteor/local/cordova-build/platforms/android edit project.properties and set target=android-28

Option 2 is harder, but better if you're not ready to update everything to API 28. You'd need to edit the plugins plugin.xml file or find where those files are referenced in a .gradle file somewhere.

  • For option 2, edit .meteor/local/cordova-build/plugins/cordova-plugin-googleplus/plugin.xml to use :16+ instead of :+ ie: ` <framework src="com.google.android.gms:play-services-auth:16+" /> <framework src="com.google.android.gms:play-services-identity:16+" />` – rafahoro Aug 8 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.