VansFannel
VansFannel

Reputation: 45941

Add a native lib to an APK

I'm developing an Android application that uses native code.

I need to add an external native library to my APK's lib folder on every build.

How can I do that?

Thanks.

Upvotes: 4

Views: 5905

Answers (1)

jonr
jonr

Reputation: 1163

Put the library in the native library path which defaults to "libs" in your project folder.

If you built the native code for the 'armeabi' target then put it under libs/armeabi. If it was built with armeabi-v7a then put it under libs/armeabi-v7a.

<project>/libs/armeabi/libstuff.so

Upvotes: 6

Related Questions