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
Note that accounts-github, accounts-facebook, and accounts-twitter all build just fine.
Apologies for the double post, but this issue is rather urgent.
On June 17, Google updated their firebase and google-play-services packages, the newest versions require API version 28, which introduces some new XML features such as ttcIndex and fontVariationSettings, as your error shows. Any cordova plugins you are using that do not explicitly list major version numbers from before the June 17th update will use the latest version by default - thus breaking your build.
You can try forcing your build to use API 28, or manually go in and edit the plugins that depend on these packages to enforce major version numbers from before June 17 - unfortunately, there is no “consistent” version number from before this date, it could be almost literally anything, so you’d need to go find each one and get the latest prior release.
In mobile-config.js, I did change the android-targetSdkVersion from 26 to 28, as per the warning that Google gave when I had submitted the APK (minus the breaking accounts-google, of course). This, however, has no effect on the problem at hand.
I’d guess that accounts google includes some plugins? I know that mobile-experience does that too. Additionally, meteor uses several plugins by default to allow hot code push, etc.
In your project, look in .meteor/local/cordova-build/plugins and .meteor/local/cordova-build/platforms/android - if plugins are causing the problem, they’ll be shown in one of those places.
I’d also make sure that those version changes you specify are actually coming through, .meteor/local/cordova-build/platforms/android/project.properties
not 26, not 28… 27? Now where could this value possibly be coming from?
As for Cordova plugins in .meteor/local/cordova-build/plugins, sure enough, there are a bunch of them, but they do not change when I add/remove accounts-google, so I guess they are not the culprit.
27 is probably coming from the version meteor claims to require? You can try setting that to 28 from there
The other thing accounts-google could be doing is adding config to the XML - also, when you said they remain after removing accounts-google, are you able to build for cordova after removing? Just want to make sure you’re not relying on the plugins being cached or something.
A nice little trick, to save time while debugging these build problems is to just run the android cordova build
from .meteor/local/cordova-build/platforms/android/
run ./gradlew build (I think)
You can iterate much faster while trying to track down the problem
meteor remove accounts-google
meteor reset
meteor run android-device
works?
and
meteor add accounts-google
meteor reset
meteor run android-device
does not?
Very likely, somewhere a build.gradle file has something like com.google.firebase:firebase-auth:+ or something similar with google-play-services basically it’s the + along with the lack of api 28 that’s causing the trouble
By the way, we also have another, much more complex project which also fails to build APK in similar fashion, but that one does not contain accounts-google. It will take several hours to determine which of the many Cordova plugins and/or packages is crashing things there.
thats where your problem will be, those versions (+) will need to be changed to the pre-june 17 versions.
If its critical to get the build going, you can just change the versions in your config.xml file (and I’m fairly sure somewhere you’ve got a gradle file with those dependencies listed too)
Sorry for being so confused. I didn’t expect to be editing a file under .meteor/local, since that would be overridden with each meteor reset.
Any idea if there is some place I can put this file, like cordova-build-override or something? Anyway, in the meantime, I’ll just hack this change into our build script.
I’m not sure - this approach didn’t work in our app, we depended on plugins that required API 26 for now so we went with the approach to hard code the + to a specific version - we only needed to get a build out to get push notifications working, so we probably wont need another build for a year or so
I’ll head over and answer your stack overflow question if you don’t mind
Lol - I know the feeling. I spent the last two days trying to figure out what was causing this - thought it was a new plugin we’d started using around the same time, turns out it wasnt!
Hi guys! i saw this post, because i’ve the same problem.
I follow your instruction, but it did’nt work!
Can you please tell me how you resolve this problem?