0

I am running the project with based on Two library projects which have libs/armeabi folders with corresponding .so files. But when I am running the project, it compiles one .so files and other .so is file not correclty pointed. So I am getting UnsatifiedLinkError.

This is project structure:

  1. LibProjectA

    +libs/armeabi/a.so

  2. LibLibProjectB

    +libs/armeabi/b.so

  3. MainProject

    • it loads a.so file successfully
    • but failes to load b.so file

It does works when I copy the a.so file as LibLibProjectB/libs/armeabi/a.so

Can you please anyone help me on this issue ?

Thanks in Advance

30thh
  • 10,861
  • 6
  • 32
  • 42
Ramesh Akula
  • 5,720
  • 4
  • 43
  • 67

1 Answers1

0

In your Android.mk you can add these lines for each library you want to add :

include $(CLEAR_VARS)
LOCAL_MODULE    := a_prebuilt
LOCAL_SRC_FILES := 3rdparty/$(TARGET_ARCH_ABI)/a.so
include $(PREBUILT_SHARED_LIBRARY)

And then, to your final module, add the following :

LOCAL_SHARED_LIBRARIES := a_prebuilt b_prebuilt

Hope it's help you !

Alto
  • 522
  • 6
  • 13
  • Thanks, Do you have any idea to implement this in gradle? – Ramesh Akula Dec 09 '14 at 09:50
  • You can do this with a simple search on Google. Follow this [link](http://stackoverflow.com/questions/20674650/how-to-configure-ndk-with-android-gradle-plugin-0-7). – Alto Dec 09 '14 at 09:58