如何解决 NDK 错误 - 我无法构建我的应用程序
How can I solve error of NDK - I can't build my app
Build command failed.
Error while executing process C:\Users\Abir CSE\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\TBL Office Project\ASS\library\src\main\cpp\Android.mk NDK_APPLICATION_MK=D:\TBL Office Project\ASS\library\src\main\cpp\Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=D:/TBL Office Project/ASS/library/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\TBL Office Project\ASS\library\build\intermediates\ndkBuild\debug\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
'C:\Users\Abir' is not recognized as an internal or external command,
operable program or batch file.
对于Android NDK,任何路径都不能包含空格。这是指:
- 项目根目录
- 项目中的目录名
- 第三方库和依赖项目的路径
- Android SDK 的路径
- NDK 本身的路径
在您的情况下,Android SDK 安装在 C:\Users\Abir CSE\AppData\Local\Android
中。将它移动到您的 %HOME% 以外的目录。
Build command failed.
Error while executing process C:\Users\Abir CSE\AppData\Local\Android\Sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\TBL Office Project\ASS\library\src\main\cpp\Android.mk NDK_APPLICATION_MK=D:\TBL Office Project\ASS\library\src\main\cpp\Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-21 NDK_OUT=D:/TBL Office Project/ASS/library/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\TBL Office Project\ASS\library\build\intermediates\ndkBuild\debug\lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
'C:\Users\Abir' is not recognized as an internal or external command,
operable program or batch file.
对于Android NDK,任何路径都不能包含空格。这是指:
- 项目根目录
- 项目中的目录名
- 第三方库和依赖项目的路径
- Android SDK 的路径
- NDK 本身的路径
在您的情况下,Android SDK 安装在 C:\Users\Abir CSE\AppData\Local\Android
中。将它移动到您的 %HOME% 以外的目录。