AICamera icon indicating copy to clipboard operation
AICamera copied to clipboard

Expected NDK STL shared object file libgnustl_shared.so

Open Suhail opened this issue 6 years ago • 10 comments

I googled around & wasn't able to find a solution for this error when I build this in Android Studio (v3.1.4):

Expected NDK STL shared object file at /Users/username/Library/Android/sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_shared.so

Suhail avatar Nov 03 '18 03:11 Suhail

same here: Expected NDK STL shared object file at /home/antonio/Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/libgnustl_shared.so

antoniosap avatar Dec 04 '18 11:12 antoniosap

Have you manage to solve the issue?

pedrobairao avatar Dec 13 '18 17:12 pedrobairao

After I downgrade the NDK version, the probelm solved for me

Annbless avatar Dec 18 '18 04:12 Annbless

If you installed NDK from Android Studio and you encountered the aforementioned issue, it means you have an higher version of it currently not compatible with the project. The simplest thing to do is to downgrade manually to NDK r17c. In order to do that you have to remove the ndk-bundle from your Android SDK home directory, download the bundle manually and substitute it. Here are the commands in Linux:

mv ~/Android/Sdk/ndk-bundle ~/Android/Sdk/ndk-bundle-backup
wget https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip
unzip android-ndk-r17c-linux-x86_64.zip
mv android-ndk-r17c ~/Android/Sdk/ndk-bundle

vlomonaco avatar Dec 18 '18 11:12 vlomonaco

Is there a better solution to this?

In particular, if one has installed NDK via the Android Studio gui, it's completely non obvious how to downgrade. Also one might not be using Linux.

toby5box avatar Dec 27 '18 04:12 toby5box

i have installed NDK from the Android Studio ,i don't konw how to downgrade.

joyce0101 avatar Dec 28 '18 07:12 joyce0101

I updated my previous comment with a bit more info, hope it helps!

vlomonaco avatar Dec 28 '18 11:12 vlomonaco

Is this project ever going to be made compatible with current tooling? e.g. current NDK?

toby5box avatar Dec 28 '18 15:12 toby5box

Without (re)moving your existing NDK for other projects, you can download and extract NDK 17c (https://dl.google.com/android/repository/android-ndk-r17c-linux-x86_64.zip), and place it anywhere on your computer. Open the local.properties file in your project folder, and change the ndk.dir to the location that you just extracted the NDK17.c to.

morrisfranken avatar Apr 15 '19 08:04 morrisfranken

https://github.com/caffe2/AICamera 9 months since last commit

tsauri avatar May 06 '19 03:05 tsauri