How to set ndk with nonzero output value 2 on android?

I want to create a Gstreamer source and it needs NDK .

I install SDK Manager Android SDK SDK Tools NDK install

and I installed local.properties dk:dir="C\:\\Users\\ddd\\AppData\\Local\\Android\\sdk\\ndk-bundle .

After installing ndk, I try to create it, but the execution failed.

Execution failed for task ':app:ndkBuild'. > Process 'command 'C:\Users\ddd\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd" finished with non-zero exit value 2 Execution failed for task ':app:ndkBuild'. > Process 'command 'C:\Users\ddd\AppData\Local\Android\sdk\ndk-bundle\ndk-build.cmd" finished with non-zero exit value 2 .

How to install ndk on Android?

+5
source share
2 answers
  • What I will explain above is that you already installed NDK, make sure that you also install CMake and LLDB . (Reboot Android Studio after installation)

  • If the problem has not yet been resolved, try deleting the "obj" folder in your ndk library (located in "yourLibary / main / src / obj") and rebuild.

This solved the problem for me.

+2
source

You need to make sure that the NDK is installed correctly - go to "File-> Project Structure-> SDK Location and make sure that the NDK location is set correctly. If so, the compilation may have failed due to some code problem, and we will need additional information to help you.

0
source

Source: https://habr.com/ru/post/1264765/