Error:Execution failed for task ':app:ndkBuild'.

1,281 views
Skip to first unread message

Narendra Kumar

unread,
Feb 19, 2018, 1:24:56 PM2/19/18
to android-ndk
Hi,
I am developing application for human detection using NDK and Open CV in android.
I have followed this Youtube link.

Getting error like this: 

Error:Execution failed for task ':app:ndkBuild'.
> A problem occurred starting process 'command '/home/android/Android/Sdk/ndk-bundle/ndk-build.cmd''

Could you please help me.I have searched in google but no luck.

Ryan Prichard

unread,
Feb 20, 2018, 8:32:07 PM2/20/18
to andro...@googlegroups.com
I have followed this Youtube link.

I think that video is recommending using a deprecated method of integrating Gradle with ndk-build.


If you want to keep using ndk-build, you could add something like this in your app module's build.gradle file (https://github.com/googlesamples/android-ndk/blob/81c680b572b95cb67636b9fea008c85e92e70516/hello-jni/app/build.gradle#L16-L20):

    externalNativeBuild {
        ndkBuild {
            path 'src/main/cpp/Android.mk'
        }
    }

Regarding the error:

Error:Execution failed for task ':app:ndkBuild'.
> A problem occurred starting process 'command '/home/android/Android/Sdk/ndk-bundle/ndk-build.cmd''

ndk-build.cmd is the Windows batch file that runs make.exe for ndk-build, but /home/android looks like a Linux path.

If you've copied a project from a Windows machine to a Linux one, then you'd want to run ndk-build, not ndk-build.cmd.

-Ryan


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+unsubscribe@googlegroups.com.
To post to this group, send email to andro...@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/2c707643-40cc-41b6-b779-acd86ceec5e2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages