How to export to Android 14 in Godot 4.2?

Godot Version

4.2.2 stable

Question

Android 14 adds a requirement that the minSDK must be 23+ in order for an app to work, but Godot 4.2 uses minSDK 21. Depending on the Android 14 device and system, some will outright deny the installation or execution of a game exported with minSDK 21.

Now I’ve tried 2 different things, but none of them seemed to have worked.

First, I changed the min SDK on the export settings with:
image

But the resulting export still yields a warning on my test device saying “The app was built for an older version of android”.

Secondly, I tried creating an export template with the minSdk changed in the config.gradle:
image

But this creates a broken APK that cannot be installed.

Is there a way to have a game run correctly on Android 14 with Godot 4.2.2?

Check Export Settings: Make sure you’re using the updated export template. Godot might not apply the changes if the template isn’t set correctly.

Rebuild Export Templates: Try rebuilding the export templates from scratch, which might solve the issue.

Buy an older phone :smiley:

If these steps don’t work… to bad ,

Unfortunately, buying an older phone is not the type of solution I can purpose to the users XD. Android 14 is already the major market share worldwide with 28%, at least according to statscounter, so if you want to deploy on Android, aiming for version 14 is a must.

However I seemed to have fixed it with the first option, by adding the 64 bit build, like so:
image

As having a 64 bit architecture seems to also be a requirement for Android 14. If using a custom export template like me, don’t forget you have to build for both arm32 and arm64.

I still would prefer to have the custom template handle the Android 14 compatibility alone without needing the “Use Gradle Build” option, but changing any minSdk version in the export templates just seems to produce a broken APK that doesn’t work.

I’ve tried changing config.gradle, detect.pyand Android’s export_plugin.cpp, as they all seem to be linked according to the comments, but no combination seems to produce working APKs.