3

Can someone guide me on the correct placement of where *.so files are supposed to be housed for a gradle/android project?

I have them in:

project->app->src->main->jniLibs

and the assets, java, and res folders are siblings to it in main as well but they don't seem to be included when the APK is built causing an 'UnsatisfiedLinkError'

EDIT

I have looked at:

Include .so library in apk in android studio

and have tried changing the director to both libs and lib with no luck.

UPDATE 1

  • The APK de-compiled now shows the *.so files under /Lib and I have them under project -> app -> src -> main -> jniLibs -> armeabi and that is their architecture but I am getting an UnsatisfiedLinkError when calling a method from within the native library although it seems to get past the System.loadLibrary call in the static constructor without showing an error
Community
  • 1
  • 1
isuPatches
  • 6,384
  • 2
  • 22
  • 30
  • 1
    app->src->main-jniLibs-a folder,you name it->.so files – Burak Karasoy Jul 21 '15 at 20:20
  • So the apk decompiled shows the so files in /lib/armeabi but there's still a link error that occurs – isuPatches Jul 21 '15 at 21:04
  • The exact message is: 'No implementation found for int...' – isuPatches Jul 21 '15 at 22:25
  • 1
    After compiling the C++ Code my .so files are placed in src -> main -> libs -> {plattform}. The plattforms depends on the plattform your .so are compiled for. Possible values could be: armeabi-v7a, armeabi, mips, x86, arm64-v8a –  Jul 22 '15 at 10:04
  • correct, they are armeabi. I tried src->main->libs-> aremabi as well. The issue has morphed...I'll update above...it seems the *.so files are included in the APK under /Lib now but calling a method from the native library throws an UnsatisfiedLink exception even though it seems to load with System.loadLibrary without hitting an issue – isuPatches Jul 22 '15 at 12:56

1 Answers1

0

*.so files are included and shown in decompiled APK now...hitting another issue which I posted here: UnsatisfiedLinkError when calling method from native library although System.loadLibrary seems ok

Community
  • 1
  • 1
isuPatches
  • 6,384
  • 2
  • 22
  • 30