I have implemented a JNI android application. This application requires a few additional ‘Shared Libs’ to be packed as part of the APK. Using Ecplise, I have added these libs to the project’s ‘/libs/armeabi’ folder.
However, when launching the application (through the integrated debugger), my added ‘Shared Libs’ are removed from the ‘armeabi’ folder.
- How can I prevent these additional libs from being removed?
- How can I make sure the additional required SOs are packed in the APK?
You don’t need to copy this libraries to
libsfolder yourself. This job should be done by thendk-build.These two steps should be enough:
Create
mylibs(you can use any other name instead) folder on the root level of your project. And put your libraries into this folder.For each library add the following lines before the
include $(CLEAR_VARS)statement replacingmylibwith you library name:(You might need slightly different path for
LOCAL_SRC_FILES. It depends on your Eclipse configuration.)