Android SDK31 / Android12

0 favourites
  • 14 posts
  • Ashley

    I can see you changed target to 31 today.

    As far as I know cordova don't even support this (yet), we are waiting for Android Cordova 11 to be compliant with 31 (Android12). It is not relased yet. The latest it cordova 10.1.1 (Nightly 10.1.2)

    I just tried an export now.

    I got

    Error exporting: Error: Invalid Android version

    I think Target31 is a major step, and a lot of work for many Cordova plugins (might) be needed. So have you tested this really? The risk of breaking seems severe

    Tagged:

  • These days every year the required target SDK version increases to be able to publish to the Google Play store. If we did nothing, then when the deadline comes it would no longer be possible to publish to the Google Play Store. We increase it well in advance to make sure there's plenty of time to sort out any compatibility issues that come up.

    I think something went wrong with it for this beta update though. As ever any issues should be filed to the tracker.

  • Sorry, but no.. That does not seem like a good approach at all. First Cordova should release their yearly new Cordova-Android version, then you should update to the new Cordova-Android and raise the target SDK.

    Cordova-Android Target API
    11.X.X SDK 31
    10.X.X SDK 30
    9.X.X SDK 29

    Cordova-Android 11 is not released yet. I think you should wait and raise the target SDK after cordova officially supports it.

    Not even all of your own official plugins officially supports SDK31

  • It worked fine the past few years. Cordova does not always need an update to support bumping the target SDK version.

  • Fix:

    1.) Create android studio export with C3

    2.) Open with Android Studio

    3.) Use "Method 2" for targetSDK (use 31)

    geeksforgeeks.org/how-to-change-the-api-sdk-level-in-android-studio

    4.) Add android:exported="true" in app>manifests>AndroidManifest.xml (Look picture)

    5.) File>Save All

    6.) Build>Build Bundle/APK

  • It will be released today Ashley.

    github.com/apache/cordova-android/blob/master/RELEASENOTES.md

    I think you should change to this new cordova version and bump api, on the first new beta on the new beta cycle. There is a few things you also need to amend for the config file, to use the new native splash. but should be minor things. (They support 32 directly now, from 30.)

    And you will need to update quite a few things on your build server I guess.

  • Thanks, I'll look in to doing that soon.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Great, thanks for the release today Ashley!

    Actually you can already raise the target to 32 (which is actually the default one by cordova now). api32 is also android 12 (12S), and there are no new functionalities you need to cater for.

    regarding the new splash, since you have dedicated exports for android and ios I think you now should remove these lines form the android config.xml file:

    • ShowSplashScreenSpinner
    • SplashMaintainAspectRatio

    Also it would be handy if you added these lines to the config.xml (even though you do not need em to be mapped from C3 editor in any way, but for people doing manually builds we often want to amend these, but you can populate them with default values):

    • FadeSplashScreen (true)
    • FadeSplashScreenDuration (500)

    Also as mentioned in the bug tracker, the icon is not handled correctly at the moment, but there is an easy fix for it.

    Also, would it be possible to format the config.xml file? it is very annoying to modify it when it comes from construct, since there is no formatting or line breaks. (standard config.xml from cordova is easily readable and standard xml formatted.)

    Also, any particular reason you still have a config.json?

  • Actually you can already raise the target to 32 (which is actually the default one by cordova now).

    Ah, I assumed 32 was for Android 13 beta, but you're right, it's for Android 12L apparently. I've updated the next beta to target API 32.

    ShowSplashScreenSpinner

    SplashMaintainAspectRatio

    Removing these is a bit tricky: ShowSplashScreenSpinner is still documented as affecting iOS, and SplashMaintainAspectRatio still applies for legacy Android builds. I've removed the latter from the latest builds though as it is indeed no longer a documented property.

    Also it would be handy if you added these lines to the config.xml

    Those tags are already the defaults, and I'd rather not re-specify the defaults, as the defaults can change and tracking the defaults manually adds to maintenance headaches in the long run.

    Also as mentioned in the bug tracker, the icon is not handled correctly at the moment, but there is an easy fix for it.

    I don't see a report for this, and it looked OK in my testing. Did you mean to file an issue?

    Also, would it be possible to format the config.xml file?

    I didn't realise it wasn't formatted! I always looked at it in an auto-formatting tool. I added formatting for the next beta.

    Also, any particular reason you still have a config.json?

    That's used by the build service.

  • Thanks for looking into! Thanks for api32.

    Removing these is a bit tricky: ShowSplashScreenSpinner is still documented as affecting iOS, and SplashMaintainAspectRatio still applies for legacy Android builds. I've removed the latter from the latest builds though as it is indeed no longer a documented property.

    Ah ok, no problem. I thought you created different config files depending on if the user did an ios or android cordova export.

    > Also as mentioned in the bug tracker, the icon is not handled correctly at the moment, but there is an easy fix for it.

    I don't see a report for this, and it looked OK in my testing. Did you mean to file an issue?

    I meant my super old ticket, which we re-opened last week. It is not related to any new changes, it is an old issue since we started with adaptives. I can verify that the fix I wrote last week will solve the issue with the fallback icon for old devices. (You should just add the src tag to the adaptive icon line and map it to the icon file in c3, then it will work correct on all devices)

    github.com/Scirra/Construct-3-bugs/issues/4689

    > Also, would it be possible to format the config.xml file?

    I didn't realise it wasn't formatted! I always looked at it in an auto-formatting tool. I added formatting for the next beta.

    Haha! wow thanks, glad it was so simple. Been thinking of filing this as a bug for so long time, since I've been struggeling with this for years :D

    > Also, any particular reason you still have a config.json?

    That's used by the build service.

    Ah cool, didn't know. I always just delete it, since I don't use it in cordova.

  • I meant my super old ticket, which we re-opened last week. It is not related to any new changes, it is an old issue since we started with adaptives.

    This isn't anything to do with splash screens though is it? I'm not sure why you brought it up in the context of the new splash screen support?

  • > I meant my super old ticket, which we re-opened last week. It is not related to any new changes, it is an old issue since we started with adaptives.

    This isn't anything to do with splash screens though is it? I'm not sure why you brought it up in the context of the new splash screen support?

    Sorry for confusion, no not related to the splashscreen.

    (Just that I remembered it now when I looked into the config.xml for the splash setup, since the issue with the icon is one of the reasons that we need to amend config.xml everytime before creating the project with the cli, since it doesn't get created correctly otherwise).

    but again, sorry for mixing it up.

    Thanks for the updates!

  • I followed this conversation but IDK why do I get "target API is 30 and minimum is 31" error when I get an AAB build and uploading?

  • I followed this conversation but IDK why do I get "target API is 30 and minimum is 31" error when I get an AAB build and uploading?

    Just build normally with the latest beta and you will get target32.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)