Skip to content
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

Android update NDK to latest version ndk26b #1415

Closed
wants to merge 10,000 commits into from
Closed

Android update NDK to latest version ndk26b #1415

wants to merge 10,000 commits into from

Conversation

crazyhappygame
Copy link
Contributor

Which branch your pull-request should merge into?

  • dev: Current 2.x BugFixs or Features

Describe your changes

Android update NDK to latest version ndk26b

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.
  • I have checked readme and add important infos to this PR (if it needed).
  • I have added/adapted some tests too.
rh101 and others added 7 commits October 25, 2023 19:25
* Ensure Live2D extension is enabled for Live2D test

* Update Live2D to work with Axmol 2.x

* [skip ci] Remove commented out shader code
* Allow optional setting target link scope for extensions when linking with Axmol.

* Fix Live2D linking with Axmol on Android
Add Android Tegra shader processing and usage
- Force cast corss config & build paramer to array to avoid combine
with builtin parameters incorrect
- Use evaluated build target to run and deploy
@halx99 halx99 added this to the next milestone Nov 1, 2023
@crazyhappygame
Copy link
Contributor Author

@halx99 can we merge this PR?

@halx99
Copy link
Collaborator

halx99 commented Nov 2, 2023

This PR will break android device compatibility, so I add to next milestone.

@crazyhappygame
Copy link
Contributor Author

What do you mean by "break android device compatibility"?
https://github.com/android/ndk/wiki/Changelog-r26

KitKat (APIs 19 and 20) is no longer supported. The minimum OS supported by the NDK is Lollipop (API level 21). See Issue 1751 for details.

@halx99
Copy link
Collaborator

halx99 commented Nov 2, 2023

What do you mean by "break android device compatibility"? https://github.com/android/ndk/wiki/Changelog-r26

KitKat (APIs 19 and 20) is no longer supported. The minimum OS supported by the NDK is Lollipop (API level 21). See Issue 1751 for details.

means build apk with ndk-r25+ can't runs on android 4.2 devices

@rh101
Copy link
Contributor

rh101 commented Nov 2, 2023

Wouldn't it be better to keep the NDK at the lowest possible version to not limit any devices? There is support in the build scripts to change the version used by passing it at the command line.

@halx99
Copy link
Collaborator

halx99 commented Nov 2, 2023

Wouldn't it be best to keep the NDK at the lowest possible version to not limit any devices? There is support in the build scripts to change the version used by passing it at the command line.

for example: axmol build -p android -a arm64 -cc ndk-r25c

@crazyhappygame
Copy link
Contributor Author

r26b is the latest supported version - LTS Version.
All other NDK versions are not officially supported any more:
Please check https://github.com/android/ndk/wiki/Unsupported-Downloads
Using unsuported NDK is gray zone (will it work with latest android version? will it work with other android libraries?)

I think that official axmol configuration by default should be build based on officially supported libraries. If someone need to support older versions 4.2, 4.1 3.0 android then probably "-cc ndk-r25c" or older can be used

@halx99 halx99 self-requested a review November 3, 2023 02:45
@halx99
Copy link
Collaborator

halx99 commented Nov 3, 2023 via email

@halx99
Copy link
Collaborator

halx99 commented Nov 3, 2023

sorry, i don't agree, axmol was tested with ndk-r23c, and works well, new devices related to sdk platform, usually not limit ndk versions. I also have check the latest unity 2023, it use ndk-r23b. we should keep it except there are critical issues of it(crashing, generating incorrect code, ...) 获取Outlook for Androidhttps://aka.ms/AAb9ysg

________________________________ From: CHP @.> Sent: Thursday, November 2, 2023 11:23:58 PM To: axmolengine/axmol @.> Cc: Deal @.>; Mention @.> Subject: Re: [axmolengine/axmol] Android update NDK to latest version ndk26b (PR #1415) r26b is the latest supported version - LTS Version. All other NDK versions are not officially supported any more: Please check https://github.com/android/ndk/wiki/Unsupported-Downloads Using unsuported NDK is gray zone (will it work with latest android version? will it work with other android libraries?) I think that official axmol configuration by default should be build based on officially supported libraries. If someone need to support older versions 4.2, 4.1 3.0 android then probably "-cc ndk-r25c" or older can be used ― Reply to this email directly, view it on GitHub<#1415 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABVHOJZWM6DA7CWVLJP3HATYCO3I5AVCNFSM6AAAAAA6ZJ37DGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJQHE2TAMRRGQ. You are receiving this because you were mentioned.Message ID: @.***>

maybe after 3-5 years, we can update ndk

halx99

This comment was marked as duplicate.

@@ -97,7 +97,7 @@ class axutils {
// }

@SuppressWarnings('unused')
static String[] findNativeBuildTools(project, cmakeVer = "3.22.1+", ndkVer = "23.2.8568313") {
static String[] findNativeBuildTools(project, cmakeVer = "3.22.1+", ndkVer = "26.1.10909125") {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also change api leve in all gradle projects

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. API changed to 21.
I did it once 0585fe5 but it was reverted

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. API changed to 21. I did it once 0585fe5 but it was reverted

yes, because when i build apk, can't install to android 4.2 emulator for testing GLESv2 compatibility.

@crazyhappygame
Copy link
Contributor Author

NDK maintainers recommend to use always latest NDK.
https://groups.google.com/g/android-ndk/c/OIek2jtx2I8/m/WjAT5eXcCQAJ

Google Play services discontinuing updates for KitKat (API levels 19 & 20) starting August 2023
https://android-developers.googleblog.com/2023/07/google-play-services-discontinuing-updates-for-kitkat.html

I understand that for some developers support ~10 years old devices and android 4.4 KitKat (~0.4%) can be required but I think that for most of us supporting devices that are officially supported by Google is the way to go.

@halx99 halx99 modified the milestones: next, 2.2.0 Nov 3, 2023
@halx99 halx99 modified the milestones: 2.2.0, next Nov 14, 2023
@halx99 halx99 closed this Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment