嗨,关于这个问题有很多问题,但无法解决我的问题。所以发布了我的错误,如果有人可以指导我特定的错误。感谢
Build command failed.
Error while executing process C:\Users\Spartan_Base\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\android\app\src\main\jni\Android.mk NDK_APPLICATION_MK=D:\android\app\src\main\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=0 APP_PLATFORM=android-14 NDK_OUT=D:/android/app/build/intermediates/ndkBuild/release/obj NDK_LIBS_OUT=D:\android\app\build\intermediates\ndkBuild\release\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
process_begin: CreateProcess(NULL, "", ...) failed.
Android NDK: D:\android\app\src\main\jni\Android.mk: Cannot find module with tag 'box2D' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
Build command failed.
Error while executing process C:\Users\Spartan_Base\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\android\app\src\main\jni\Android.mk NDK_APPLICATION_MK=D:\android\app\src\main\jni\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-14 NDK_OUT=D:/android/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\android\app\build\intermediates\ndkBuild\debug\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
Android NDK: D:\android\app\src\main\jni\Android.mk: Cannot find module with tag 'box2D' in import path
Android NDK: Are you sure your NDK_MODULE_PATH variable is properly defined ?
Android NDK: The following directories were searched:
Android NDK:
process_begin: CreateProcess(NULL, "", ...) failed.
答案 0 :(得分:0)
您的 Android.mk 有一行
$(call import-module, box2D)
但您没有将 box2D / Android.mk 的路径添加到 NDK_MODULE_PATH 。
有关解释,请参阅https://developer.android.com/ndk/guides/android_mk.html。
如果您将https://github.com/mcxiaoke/box2d-ndk下载到 D:\ Downloads \ box2D ,则可以添加行
NDK_MODULE_PATH += D:/Downloads/box2D/jni
到D:\android\app\src\main\jni\Application.mk
答案 1 :(得分:0)
不知道,如果这是正确的解决方案,但是在我从JNI文件夹中打开Android.mk文件并删除了文件开头那里的一些空行后,我的问题得到修复