Help with Cordova target sdk version (solved)

I am upgrading to the latest Meteor 1.12 from 1.8. All packages run and it is building a Cordova Android apk as well. But it forces the Target Android SDK Version to 28, but according to Google Notification the target sdk version should be 29 for checking in apps to playstore from 1 Nov 2020. Earlier in meteor 1.8 using App.setPreference(‘android-targetSdkVersion’, ‘xx’) I was able to satisfy the earlier prerequisite of target sdk which was 28. But I notice in Meteor 1.12 this override is being ignored.

Is anybody else facing similar issues. If yes, any workarounds? Thanks

can you try removing your .meteor/local directory and rebuilding - that helped for us, but there was a time when there was no workaround for this, and Meteor just enforced a version - we ended up having to modify the generated files and trigger a partial build by hand - so hopfeully a clearing of the local directory resolves it for you!

I have tried deleting cordova-build directory and tried removing and adding platform again, but to no effect. Please can I check check if you are able to build apk for target sdk 29 with Meteor 1.12 with no modification to generated files. This will help me focus on where I am doing wrong.

I’m not on 1.12 - but had this exact issue on 1.8. On 1.8 the only option was to manually modify the source files. When we upgraded to 1.10, the issue went away, but only after removing the local directory.

Have tried deleting all from local other than db … the target sdk forces to 28 even when preference is given on mobile-config is given for 29. Meteor seems to copy this to the config.xml in .local/cordova-build but does not propagate it to the platform folder. I have tried with 1.12.1 beta as well, does not seem to work. It probably looks like I need to modify the generated file.

Could you please confirm with 1.10 you are able to create apk with target sdk 29.

Looks like the generated apk is ok and has the correct information on it, I need to check if playstore accepts it.


    android:targetSdkVersion="29" />

Pasted the info from the Android Manifest file within the apk.

Thanks for the help.

I just tried with 1.10 and was able to build an APK which targets 29 just fine, I modified the mobile-config.js to App.setPreference('android-targetSdkVersion', '29'); and it seems to have worked.

I use the following to compile with Android SDK 29:
export ORG_GRADLE_PROJECT_cdvBuildToolsVersion=“29.0.0” && export ORG_GRADLE_PROJECT_cdvCompileSdkVersion=29 && meteor run android-device --settings=settings.json --mobile-server=

Would be good if we update Meteor to use Cordova 9.0.x in order to prevent compiling against SDK 28 which is no longer supported by Google to submit to Google Play… Is there any work ongoing on that @filipenevola?