Setting up project to use libgnustl_shared.so

I have a project setup to use libgnustl_shared.so by specifying -lgnustl_shared as a linker command line argument. However the resulting apk does not contain it. When I add it manually via aapt, I get the error:

Package com.mycompany.myapp has no certificates at entry lib/armeabi-v7a/libgnustl_shared.so; ignoring, which then seems to results in the package not loading.

What is the proper way to specify gnustl_shared?

Hello Bill,

You can do the following steps:

  1. Set the STL Type project property to “gnustl_dynamic” without quotes (it’s not in the list, we will fix this in the future).
  2. Set Pre-Ant Event to
copy /b /y "path-to-gnustl" "libs\armeabi-v7a\libgnustl_shared.so"
  1. Add a System.loadLibrary(“gnustl_shared”) call before the main project’s library load call.

That should be enough to make everything work.

Awesome. Thank you!