似乎我找不到答案。
Android NDK:您的APP_BUILD_SCRIPT指向一个未知文件:./ jni / Android.mk
F:/Android/android-ndk-r10d/build/core/add-application.mk:199:*** Android NDK:正在中止....停止。
这是NDKLOG = 1
C:\>F:/Android/android-ndk-r10d/ndk-build NDK_LOG=1
Android NDK: NDK installation path auto-detected: 'F:/Android/android-ndk-r10d'
Android NDK: GNU Make version 3.81 detected
Android NDK: Host OS was auto-detected: windows
Android NDK: Host operating system detected: windows
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to windows
Android NDK: Host tools prebuilt directory: F:/Android/android-ndk-r10d/prebuilt
/windows/bin
Android NDK: Host 'echo' tool: F:/Android/android-ndk-r10d/prebuilt/windows/bin/
echo.exe
Android NDK: Host 'echo -n' tool: F:/Android/android-ndk-r10d/prebuilt/windows/b
in/echo.exe -n
Android NDK: Host 'cmp' tool: F:/Android/android-ndk-r10d/prebuilt/windows/bin/c
mp.exe
Android NDK: Host 'awk' tool: F:/Android/android-ndk-r10d/prebuilt/windows/bin/a
wk.exe
Android NDK: Host 'awk' test returned: Pass
Android NDK: Found platform root directory: F:/Android/android-ndk-r10d/platform
s
Android NDK: Found supported platforms: android-12 android-13 android-14 android
-15 android-16 android-17 android-18 android-19 android-21 android-3 android-4 a
ndroid-5 android-8 android-9
Android NDK: PLATFORM android-12 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-12/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-12/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-12/arch-x86
Android NDK: PLATFORM android-13 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-13/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-13/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-13/arch-x86
Android NDK: PLATFORM android-14 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-14/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-14/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-14/arch-x86
Android NDK: PLATFORM android-15 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-15/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-15/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-15/arch-x86
Android NDK: PLATFORM android-16 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-16/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-16/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-16/arch-x86
Android NDK: PLATFORM android-17 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-17/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-17/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-17/arch-x86
Android NDK: PLATFORM android-18 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-18/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-18/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-18/arch-x86
Android NDK: PLATFORM android-19 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-19/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-19/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-19/arch-x86
Android NDK: PLATFORM android-21 supports: arm arm64 mips mips64 x86 x86_64
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-21/arch-arm
Android NDK: ABI arm64 sysroot is: F:/Android/android-ndk-r10d/platforms/andro
id-21/arch-arm64
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-21/arch-mips
Android NDK: ABI mips64 sysroot is: F:/Android/android-ndk-r10d/platforms/andr
oid-21/arch-mips64
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-21/arch-x86
Android NDK: ABI x86_64 sysroot is: F:/Android/android-ndk-r10d/platforms/andr
oid-21/arch-x86_64
Android NDK: PLATFORM android-3 supports: arm
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-3/arch-arm
Android NDK: PLATFORM android-4 supports: arm
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-4/arch-arm
Android NDK: PLATFORM android-5 supports: arm
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-5/arch-arm
Android NDK: PLATFORM android-8 supports: arm
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-8/arch-arm
Android NDK: PLATFORM android-9 supports: arm mips x86
Android NDK: ABI arm sysroot is: F:/Android/android-ndk-r10d/platforms/android
-9/arch-arm
Android NDK: ABI mips sysroot is: F:/Android/android-ndk-r10d/platforms/androi
d-9/arch-mips
Android NDK: ABI x86 sysroot is: F:/Android/android-ndk-r10d/platforms/android
-9/arch-x86
Android NDK: Found stable platform levels: 12 13 14 15 16 17 18 19 21 3 4 5 8 9
Android NDK: Found max platform level: 21
Android NDK: This NDK supports the following target architectures and ABIS:
Android NDK: arm: armeabi armeabi-v7a armeabi-v7a-hard
Android NDK: arm64: arm64-v8a
Android NDK: mips: mips
Android NDK: mips64: mips64
Android NDK: x86: x86
Android NDK: x86_64: x86_64
Android NDK: This NDK supports the following toolchains and target ABIs:
Android NDK: aarch64-linux-android-4.9: arm64-v8a
Android NDK: aarch64-linux-android-clang3.4: arm64-v8a
Android NDK: aarch64-linux-android-clang3.5: arm64-v8a
Android NDK: arm-linux-androideabi-4.6: armeabi armeabi-v7a armeabi-v7a-hard
Android NDK: arm-linux-androideabi-4.8: armeabi armeabi-v7a armeabi-v7a-hard
Android NDK: arm-linux-androideabi-4.9: armeabi armeabi-v7a armeabi-v7a-hard
Android NDK: arm-linux-androideabi-clang3.4: armeabi armeabi-v7a armeabi-v7a
-hard
Android NDK: arm-linux-androideabi-clang3.5: armeabi armeabi-v7a armeabi-v7a
-hard
Android NDK: mips64el-linux-android-4.9: mips64
Android NDK: mips64el-linux-android-clang3.4: mips64
Android NDK: mips64el-linux-android-clang3.5: mips64
Android NDK: mipsel-linux-android-4.6: mips
Android NDK: mipsel-linux-android-4.8: mips
Android NDK: mipsel-linux-android-4.9: mips
Android NDK: mipsel-linux-android-clang3.4: mips
Android NDK: mipsel-linux-android-clang3.5: mips
Android NDK: x86-4.6: x86
Android NDK: x86-4.8: x86
Android NDK: x86-4.9: x86
Android NDK: x86-clang3.4: x86
Android NDK: x86-clang3.5: x86
Android NDK: x86_64-4.9: x86_64
Android NDK: x86_64-clang3.4: x86_64
Android NDK: x86_64-clang3.5: x86_64
Android NDK: Looking for jni/Android.mk in C:
Android NDK: Looking for AndroidManifest.xml in C:
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
F:\Android\android-ndk-r10d\build/core/build-local.mk:148: *** Android NDK: Abor
ting . Stop.
答案 0 :(得分:0)
从项目的顶级目录中运行ndk-build,而不是像C:\那样运行。否则,它无法在项目的jni部分找到文件,如您所见:
Android NDK: Looking for jni/Android.mk in C:
Android NDK: Looking for AndroidManifest.xml in C:
Android NDK: Could not find application project directory !
Android NDK: Please define the NDK_PROJECT_PATH variable to point to it.
这表明您还可以选择将NDK_PROECT_PATH环境变量设置为告诉工具在哪里找到项目的替代方法。但是,unix风格的环境变量经常成为Windows的一个问题,至少在历史上它的默认环境尺寸很小。