I tried to add library into project, but android studio ignore my lib.
My CmakeLists.txt
add_library( mylib SHARED IMPORTED )
set_target_properties(ffmpeg PROPERTIES IMPORTED_LOCATION src/main /libs/${ANDROID_ABI}/libmylib.so )
After building my apk not contain libmylib.so. How to add prebuilt library into project with cmake?
currently need to pack it by the app. it could be something like:
one example is: https://github.com/googlesamples/android-ndk/blob/master/hello-libs/app/build.gradle If your shared lib [yours is inside project path] is close to your project, put relative path of your shared-lib to your CMakeLists.txt would work.
Some background discussion at the bottom of this bug might help: https://code.google.com/p/android/issues/detail?id=214664&can=8&q=vulkan&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened
1 - In the root directory, create new folder: /libs in which and place your external libraries in there.
2 - Change the project structure
3 - don't forget to change gradle.setting to
4-In app/build.gradle add your library
Also there is way in android studio to add your library so it config gradle and project structure and it is :
1.File / Project Structure /
2.In module section find your project and in Dependancy tab add your library