Search code examples
androidandroid-ndkndk-build

Error while executing process .../ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null


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}

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

UPDATE

from TERMINAL:

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.

Solution

  • 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.

    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:

    define NDK_MODULE_PATH in your environment to let NDK find the module ffmpeg/android/arm