Android build: worrying message in the build log

When building for Android, there is a message in :app:stripDebugDebugSymbols task that says that Gradle will be using NDK 23.1.7779620 (see below) that worries me since the builds that use this version of NDK don’t work well with the current Lime version. Is there a way to avoid this? I tried to set the NDK to 21 using this:

None of the options worked.

Or probably it can be just ignored? I don’t have NDK 23 installed, not sure if Gradle (where the message comes from) can somehow download and use it.

I built Pirate Pig from OpenFL smples.

The build setup was as follows:
OpenFL 9.3.3
Lime 8.1.2
HXCPP 4.2.1
NDK 21.4.7075529

> Task :app:stripDebugDebugSymbols
Caching disabled for task ':app:stripDebugDebugSymbols' because:
  Build cache is disabled
Task ':app:stripDebugDebugSymbols' is not up-to-date because:
  Input property 'inputDir' file C:\HaxeToolkit\haxe\lib\openfl-samples\8,7,0\demos\PiratePig\Export\android\bin\app\bui
ld\intermediates\merged_native_libs\debug\out\lib\arm64-v8a\libApplicationMain.so has changed.
  Input property 'inputDir' file C:\HaxeToolkit\haxe\lib\openfl-samples\8,7,0\demos\PiratePig\Export\android\bin\app\bui
ld\intermediates\merged_native_libs\debug\out\lib\armeabi-v7a\libApplicationMain.so has changed.
C/C++: android.ndkVersion from module build.gradle is [not set]
C/C++: android.ndkPath from module build.gradle is C:\dev\Android\ndk\21.4.7075529
C/C++: ndk.dir in local.properties is not set
C/C++: android.ndkVersion from module build.gradle is [not set]
C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
C/C++: android.ndkPath from module build.gradle is C:\dev\Android\ndk\21.4.7075529
C/C++: sdkFolder is c:\dev\Android
C/C++: ndk.dir in local.properties is not set
C/C++: Because no explicit NDK was requested, the default version [23.1.7779620] for this Android Gradle Plugin will be
used
C/C++: Not considering ANDROID_NDK_HOME because support was removed after deprecation period.
C/C++: sdkFolder is c:\dev\Android
C/C++: Because no explicit NDK was requested, the default version [23.1.7779620] for this Android Gradle Plugin will be used

Unfortunately, the current stable release of hxcpp 4.3.2 doesn’t support newer NDKs than NDK 21. We’re stuck on 21 as the newest version that we can use in Lime and OpenFL until hxcpp gets updated. It’s worrying if Gradle is choosing a newer NDK than we can use.

The following PR has been merged into hxcpp to support NDK 22+ :smile:, but it hasn’t been released to Haxelib yet :sob:.

There is another hxcpp PR pending that seems to indicate that additional updates are needed for NDK 26+:

In the meantime, I wonder what would be necessary to “request an explicit NDK” for Gradle so that newer versions are not chosen as a default. Ideally, we’d be able to modify one of Lime’s Android_build.gradle_ files to ensure that our preferred NDK version is used.

Thanks @joshtynjala!

Will check if the changes in grade.build work later today and share the results.

Good to hear hxcpp is going to support NDK 21+ :slight_smile: Hope Lime could be updated too to support Haxe 4.3.+ :innocent:

Actually, I do understand that open source software doesn’t work like this - if I need Lime update I should make this update myself hehe ) Unfortunately, it’s beyond my powers. Or rather I have to focus on the other things.

Adding the following line next to ndkPath removed the message (assuming the correct NDK was used):

ndkVersion "21.4.7075529"

Is there a way to add the NDK version number through some variables, like ::ANDROID_NDK_VERSION:: instead of the exact version number?

Not sure if it helps, but the NDK version number can be obtained from source.properties file that is in the root of the NDKs (at least it’s true for these NDKs that I have installed).

Pkg.Revision = 21.4.7075529

2 posts were split to a new topic: Android builds that uses Haxe 4+ and HXCPP 4+ crash on some devices