问题描述
为什么会出现下一个错误? p.s. ndk-bundle
上没有任何ndk-build
文件夹是什么意思?
Why do I get next error? p.s. there is no any ndk-build
folder at ndk-bundle
what does it mean?
Build command failed.
Error while executing process /home/user/Android/Sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/user/JNI/app/src/main/jni/Android.mk NDK_APPLICATION_MK=/home/user/JNI/app/src/main/jni/Application.mk APP_ABI=arm64-v8a NDK_ALL_ABIS=arm64-v8a NDK_DEBUG=1 APP_PLATFORM=android-23 NDK_OUT=/home/user/JNI/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/user/JNI/app/build/intermediates/ndkBuild/debug/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n}
在我的~/.bashrc
中,我有下一个:
in my ~/.bashrc
I have next:
export NDK=/home/user/Android/Sdk/ndk-bundle
export PATH=$PATH:$NDK
export PATH=$PATH:/home/user/Android/Sdk
更新
来自终端:
user@user-X556UQK:~/Android/Sdk/ndk-bundle$ ndk-build NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/home/user/Android/AndroidStudioProjects/JNIINVOKEFFMPEG1/app/src/main/jni/Android.mk NDK_APPLICATION_MK=/home/user/Android/AndroidStudioProjects/JNIINVOKEFFMPEG1/app/src/main/jni/Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-23 NDK_OUT=/home/user/Android/AndroidStudioProjects/JNIINVOKEFFMPEG1/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/home/user/Android/AndroidStudioProjects/JNIINVOKEFFMPEG1/app/build/intermediates/ndkBuild/debug/lib APP_SHORT_COMMANDS=false LOCAL_SHORT_COMMANDS=false -B -n
Android NDK: /home/user/Android/AndroidStudioProjects/JNIINVOKEFFMPEG1/app/src/main/jni/Android.mk: Cannot find module with tag 'ffmpeg/android/arm' 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:
/home/user/Android/AndroidStudioProjects/JNIINVOKEFFMPEG1/app/src/main/jni/Android.mk:14: *** Android NDK: Aborting. . Stop.
推荐答案
因此,最重要的是,当您在Android Studio中看到此消息时,
So the bottom line is, when you see this message in Android Studio,
Error while executing process …/ndk-bundle/ndk-build with arguments {…}
并且您不知道真正导致错误的原因,您应该尝试在终端中使用完全相同的参数运行完全相同的命令.输出可能会给您一个合理的提示.
and you don't know what really caused the error, you should try to run exactly same command with exactly same arguments in terminal. The output may give you a reasonable hint.
特别是在这种情况下,来自Android NDK的错误消息说明了哪个文件(/home/user/Android/AndroidStudioProjects/JNIINVOKEFFMPEG1/app/src/main/jni/Android.mk
)和哪一行( 14 )遇到了问题,甚至还说明了您可以采取的解决措施:
Specifically in this case, the error message from Android NDK explained which file (/home/user/Android/AndroidStudioProjects/JNIINVOKEFFMPEG1/app/src/main/jni/Android.mk
) and which line (14) was in trouble, and even explains what you can do to fix:
这篇关于使用参数{NDK_PROJECT_PATH = null时,执行进程.../ndk-bundle/ndk-build时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!