android: NDK 23 is incompatible with release builds - Execution failed for task ':app:stripReleaseDebugSymbols'.
Environment
- CLI: Doesn’t matter
- Android Runtime: 8.x (and prior)
Describe the bug Error during release build it:
Execution failed for task ':app:stripReleaseDebugSymbols'.
error=2, No such file or directory
In release mode the current gradle attempts to call *-linux-android-strip and these tools has been removed in v23 of the NDK, and the recommendation is now to use llvm-strip.
Possible work arounds:
- Update the
App_Resources/android/app.gradlefile add andkVersion "22.0.7026061"(using which ever versions you have installed before v23) in theandroid {section of the file. - Copy the
ndk/<prior_version>/toolchains/llvm/prebuilt/linux-x86_64/bin/*-linux-android-stripfrom v2x to v23 directory. (4 of them, x86_64, arm, i686 and aarch64
To Reproduce
ns build android --release --key-store-... and have ndk v23 installed
Expected behavior Works.
Future Solution
- We need to upgrade the gradle plugin to v4.1 or later… (We are currently using v3.x)
Additional context
- https://github.com/android/ndk/issues/843
- #1654 will probably fix this because it upgrades the gradle plugin.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 16 (6 by maintainers)
@JJB1980 yes you can just add this ndkVersion to your app.gradle in meantime:
Update: It is works! lol The only thing I do is delete all NDK folder inside Library/Android/sdk/ndk and just left 22.1.7171670 folder and success! Thanks guys for support!
@mykone github runners should have ndk
22.1.7171670pre installed https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.mdOk. Cool @rigor789 , thanks… Will remove my install NDK step then… And use the ndk version you suggested above. Thanks man.
Anyone have any clue how to install ndk in a github workflow file to be used with the above gradle file?