Hello, I am trying to build my application with API level 31, which is already required by the Play Store and I am finding it impossible.
In theory I need cordova-android11 but there is no way to update this on my Meteor. I have it updated to 2.8, I have deleted cordova-android but I always end up running firstname.lastname@example.org.
Can anyone shed some light on this topic for me?
Thank you very much
Hi. I also had a few issues with this. Could solve it in a bit hacky way. Cf. Building Cordova Android SDK 31 target with FCM push support
Hey, was able to build for API level 31 using these steps:
- Build using API level 30
App.setPreference("android-targetSdkVersion", "30") in
- Update to use API level 31 in Android Studio
AndroidManifest.xml to all parents of
PendingIntent contentIntent = PendingIntent.getActivity(this, requestCode, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT); =>
PendingIntent contentIntent = PendingIntent.getActivity(this, requestCode, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT|PendingIntent.FLAG_IMMUTABLE);
PendingIntent deleteIntent = PendingIntent.getBroadcast(this, requestCode, dismissedNotificationIntent, PendingIntent.FLAG_CANCEL_CURRENT); =>
PendingIntent deleteIntent = PendingIntent.getBroadcast(this, requestCode, dismissedNotificationIntent, PendingIntent.FLAG_CANCEL_CURRENT|PendingIntent.FLAG_IMMUTABLE);
Thank you for your answers. Finally I managed to upload the APP with API 31, as soon as I have a while I will post the steps that led me to do it.
Please do! It will help a lot of us!
The steps to be able to upload the API in meteor (compilation from Windows), which worked for me, have been the following:
Install Java 11.
Install from Android Studio “cmdline-tools” and to avoid errors, add in Path (just before the logs for %ANDROID_HOME%\sdk\tools and \sdk\platform-tools):
These are the binaries we just installed.
Finally add in the mobile-config.js:
App.appendToConfig('<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity" xmlns:android="http://schemas.android. com/apk/res/android"><activity android:exported="true"></activity></edit-config>');
I hope this can help someone.
How did you update
Basically just search for the string
com.google.gms:google-services by right clicking “app” on the left in the project browser and choosing “find in files”…
At least that’s what I did
I’ve added / changed the gradle java by going to the projects / Android Studios’ settings → Build, Execution, Deployment → Build Tools → Gradle, and downloading & selecting “corretto-11” from Amazon as Gradle JDK.
BTW @cmboros : You should have gotten an award for your post, thank you so much, helped out a lot!