• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps [SOLVED] Can't get started with ndk on archlinux

I followed this page https://developer.android.com/ndk/guides/ to install the necessary to getting started.
So I open new project as I do normally with checking c/c++ and blank example.
when android studio open the main window, it can't build the default program by giving this error :
External Native Build issues (2 errors).

this is the contents of the file CMakeOutput.log :
Code:
The target system is: Android - 1 - armv7-a
The host system is: Linux - 4.17.6-1-ARCH - x86_64
and this is the contents of the file CMakeError.log
Code:
Determining if the C compiler works failed with the following output:
Change Dir: /home/abdelillah/AndroidStudioProjects/test/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeTmp

Run Build Command:"/home/abdelillah/Android/Sdk/cmake/3.6.4111459/bin/ninja" "cmTC_dd920"
[1/2] Building C object CMakeFiles/cmTC_dd920.dir/testCCompiler.c.o
FAILED: /home/abdelillah/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang  --target=armv7-none-linux-androideabi --gcc-toolchain=/home/abdelillah/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64 --sysroot=/home/abdelillah/Android/Sdk/ndk-bundle/sysroot   -isystem /home/abdelillah/Android/Sdk/ndk-bundle/sysroot/usr/include/arm-linux-androideabi -D__ANDROID_API__=15 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -o CMakeFiles/cmTC_dd920.dir/testCCompiler.c.o   -c /home/abdelillah/AndroidStudioProjects/test/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeTmp/testCCompiler.c
/home/abdelillah/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
ninja: build stopped: subcommand faile

other things, I can't edit "native-lib.cpp" directly in the main window, because it's not appear in the folder cpp in the left side even this file exist, I can see it using terminal. the following image show you what I mean

help please
 

Attachments

  • android.png
    android.png
    232.7 KB · Views: 127
Last edited:

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones