-
-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Bump the minimum supported SDK version to 24 #106148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We should also bump the target SDK to 35. Edit: Okay, I just saw #106152, which bumps the target SDK along with other stuff. |
@syntaxerror247 They are separate PRs because we'll need to cherry-pick the other one in order to meet the Play Store annual requirements for our 4.4 release, whereas we don't want to cherry-pick this PR in previous releases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that it's time to upgrade our baseline.
You can now also remove this if
check which is always true:
platform/android/java_godot_view_wrapper.cpp
44: if (android_device_api_level >= __ANDROID_API_N__)
In our Kotlin and Java files, we still have these checks as well. But if we introduce API < 24 via SCons parameters, these API-level checks will still be needed (I think). if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) thirdparty: google/android/vendingThis file includes/supports Android 3 & 4, but also contains Godot edits. // -- GODOT start --
// -- GODOT end -- Maybe I'll find time tomorrow to remove it if it's not critical. godot/platform/android/java/lib/src/com/google/android/vending/expansion/downloader/Helpers.java Lines 228 to 240 in 0793c62
|
Details
GH Check Logs
|
c7b15c4
to
8745575
Compare
Raise the minimum supported Android version from Android 5 (Lollipop) to Android 7 (Nougat).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested: target=template_debug arch=arm64
on Samsung Tab S7
The code looks good to me, Android (3, 4,) 5, 6 support removed.
The issue was caused by our version of zipalign
Note: new editor version required, Export / Remote Deploy
not compatible with v4.4.1.stable.official [49a5bc7].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is reasonable for 4.5. Devices that can only run Android 5 or 6 are likely too slow to run Godot 4.5 projects with decent performance anyway (even in Compatibility).
For the record, Unity seems to have 23 as their min SDK currently: https://docs.unity3d.com/6000.1/Documentation/Manual/android-requirements-and-compatibility.html I'm still on the fence on whether we should optionally keep support for SDK 21 for users who want it and would compile their own templates for OpenGL ES only games. But I agree with Calinou that such old devices typically don't have the specs to run Godot 4 apps decently (Godot 3.x with OpenGL ES 2.0 can still be a viable option). So I'd say let's go ahead with this change, and if we see significant pushback, we can consider bringing back compile-time support for SDK 21 while keeping SDK 24 as the default for official builds. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes looks good!
I'm fine with bumping the minsdk to 24, but just to clarify: bringing back support for SDK 21 won't be trivial after this PR, as future changes will no longer guarantee compatibility with lower API levels, and this PR also removes the fallback code used for SDK 23 and below. |
Yeah it would imply partially reverting some of the changes in this PR, and possibly add a CI job that builds for SDK 21 so we make sure new PRs don't forget to add version checks when using > 21 APIs. As we see in this PR currently it's only a handful of APIs that are impacted so it shouldn't be too difficult (but of course as time passes we'll want to make use of more modern APIs, increasing the pressure on our lower baseline). |
Thanks! |
Raise the minimum supported Android version from Android 5 (Lollipop) to Android 7 (Nougat).
On the negative side, this removes support for 1.3% Android devices.
On the plus side:
24
, simplify the build config and ensuring that all supported Android devices have the min required version for vulkan support.My preference is to make the bump to api version 24.