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

Default NDK no longer supported for Google Play Store uploads. #20754

Open
Josh1603 opened this issue Nov 14, 2022 · 5 comments
Open

Default NDK no longer supported for Google Play Store uploads. #20754

Josh1603 opened this issue Nov 14, 2022 · 5 comments

Comments

@Josh1603
Copy link

Josh1603 commented Nov 14, 2022

It would seem that as it is, this engine can no longer be used to build games which can be published on the Google Play Store.

As of November 2022 Google Play Store uploads require Android 12 ( API level 31 ) as a minimum target API level.

Android 12's minimum required NDK version is now NDK r23 (NDK 23.0.7599858)

Steps I took to fix:

  1. Download a compatible NDK ( I used NDK 23.0.7599858 )
  2. Remove ndk.dir= from local.properties file
  3. Add ndkVersion = "23.2.8568313" to project level build.gradle file
  4. Add implementation 'androidx.work:work-runtime-ktx:2.7.0' to project level build.gradle dependencies
@Josh1603 Josh1603 changed the title Max Supported NDK no longer supported for Google Play Store uploads. Is this engine no longer able to used to produce games which can be released on the Google Play Store? Max Supported NDK no longer supported for Google Play Store uploads. Is this engine no longer able to be used to produce games which can be released on the Google Play Store? Nov 14, 2022
@rh101
Copy link
Contributor

rh101 commented Nov 16, 2022

There is an existing fork of Cocos2d-x v4 that works with the latest NDK, so perhaps you can back-port the changes if you don't want to use the fork. You can find it here.

@kadko
Copy link

kadko commented Nov 16, 2022

I am using NDK 22 almost latest, with this cocos2dx v4, I just changed NDK path resided in local.properties file and it works

@Josh1603
Copy link
Author

Thanks rh101, I'll have a crack with that.

I noticed all the NDK r22 releases led to runtime crashes when I tested this out with a Cocos2d-x project on a Pixel 6. Besides, even though NDK r22 is a relatively new release (March, 2021), NDK r22 is still too low to meet the current app store requirement. Android 12 was released in October, 2021 and requires NDK r23.

@Josh1603
Copy link
Author

With the fixes mentioned in the answer, I'm no longer having any runtime crashes.

@Josh1603 Josh1603 changed the title Max Supported NDK no longer supported for Google Play Store uploads. Is this engine no longer able to be used to produce games which can be released on the Google Play Store? Default NDK no longer supported for Google Play Store uploads. Nov 18, 2022
@xixuangezu
Copy link

There is an existing fork of Cocos2d-x v4 that works with the latest NDK, so perhaps you can back-port the changes if you don't want to use the fork. You can find it here.

When I use the Ndk r23, the following errors will be reported when compiling, but the Ndk r21 can be used normally. What should I do?:

ld: error: lib/libluacocos2d.a(CCLuaEngine.cpp.o): unable to find library from dependent library specifier: lua51.lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants