Android-deploy error during gradle clean build

Hi,

I am building the standalone android app to deploy tvm. I have compiled TVM4J. During gradle clean build, I am getting the following error:

Task :app:buildJni FAILED src/main/jni/build.sh: 25: src/main/jni/build.sh: ndk-build: not found

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:app:buildJni’.

Process ‘command ‘sh’’ finished with non-zero exit value 127

I am using ubuntu on WSL, installed ndk using sdk. Any help?

Thanks!

Did you add ndk-build to your path?

2 Likes

used this command to add path but didn’t work:

export PATH=$PATH:~/opt/android-ndk/android-ndk-r19c

thanks for your response!

got it, was using wrong path:

correct path:
export PATH=$PATH:/opt/android-ndk/android-ndk-r19c

2 Likes