External Native Build Issues Android Studio NDK Sample HelloJni (Build Failed)
29,954
Solution 1
open Terminal and run this command:
gradlew build --stacktrace
Solution 2
If you run under Linux you need to install Ninja. sudo apt install ninja-build
Tested today.
Solution 3
you have to install ninja using homebrew
brew install ninja
Solution 4
You also need to install ncurses5
(for arch-linux its AUR package - ncurses5-compat-libs
), since NDK support on Android Studio 2.2 doesn't use ncurses6 which might be installed on your system.
Solution 5
I solved my problem with examining log files.
./app/.cxx/cmake/commonDebug/x86/android_gradle_generate_cmake_ninja_json_x86.stderr.txt
Author by
Gunjan Dave
Updated on July 23, 2022Comments
-
Gunjan Dave almost 2 years
Error: executing external native build for cmake C:\Users\PC1\Desktop\ndkdata\GDNdkText\app\CMakeLists.txt
Error While Building:
I have installed NDK, CMake, LLDP as mentioned here. Do I need to install any other tool or need to set any environment variables?
-
Neha Sharma over 5 yearsIts
gradlew build --stacktrace
-
Sergio about 5 yearsIt works on MacOs. Homebrew may ask to change the ownership of some directories, in my case I used the command
sudo chown -R user_name /usr/local/lib/pkgconfig
, whereuser_name
is the name of the current user. And after that the commandbrew install ninja
did the trick.