I added a working ndk-build Makefiles to an Android Studio 2.2 project to be able to debug C ++ code in Android Studio. Although I can create and debug the code, I get strange error messages in the Gradle console window when switching the assembly type, for example. release for debugging. Error message:
process_begin: CreateProcess(NULL, "", ...) failed.
process_begin: CreateProcess(NULL, "", ...) failed.
process_begin: CreateProcess(NULL, "", ...) failed.
process_begin: CreateProcess(NULL, "", ...) failed.
The total number of messages depends on the number of build options and active ndk ABIs (#buildVariants * #ABIs). If only one ABI and two build options are configured (debugging, release), an error message is printed 2 times. For two ABIs and 2 build options, it prints 4 times, etc.
Enabling the option --debugfor Gradle indicates that the message occurs before ndkBuild is executed:
...
C:/data/Android/sdk/ndk-bundle/build//../prebuilt/windows-x86_64/bin/echo.exe [armeabi-v7a] "Install ": "libmurl_openal_soft.so => C:\data\private\x\y\Test\project\android\gradle\app\build\intermediates\ndkBuild\debug\lib/armeabi-v7a/libmurl_openal_soft.so"
copy /b/y "C:\data\private\x\y\Test\project\android\gradle\app\.externalNativeBuild\ndkBuild\debug\obj\local\armeabi-v7a\libmurl_openal_soft.so" "C:\data\private\x\y\Test\project\android\gradle\app\build\intermediates\ndkBuild\debug\lib\armeabi-v7a\libmurl_openal_soft.so" > NUL
C:/data/Android/sdk/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64/bin/arm-linux-androideabi-strip --strip-unneeded C:\data\private\x\y\Test\project\android\gradle\app\build\intermediates\ndkBuild\debug\lib/armeabi-v7a/libmurl_openal_soft.so
16:40:51.437 [ERROR] [org.gradle.api.Project] process_begin: CreateProcess(NULL, "", ...) failed.
16:40:51.437 [INFO] [org.gradle.api.Project] External native build debug: done executing ndkBuild
16:40:51.437 [INFO] [org.gradle.api.Project] External native build debug: write build output output C:\data\private\x\y\Test\project\android\gradle\app\.externalNativeBuild\ndkBuild\debug\armeabi-v7a\ndkBuild_build_output.txt
16:40:51.439 [INFO] [org.gradle.api.Project] External native build debug: parse and convert ndk-build output to build configuration JSON
...
I did not notice any negative effect on the build result itself, and error messages are not displayed when creating the APK. However, error messages during modifications to build options are annoying. Any hint on how to find the root cause of the error messages would be greatly appreciated.
source
share