-1

After copying all the required files which includes .jar and .so files into my app libs/ folder, I'm still receiving the following error (couldn't find "libstlport_shared.so"). Do I need to do anything else to import the files?

Android Studio App Folder Structure

01-04 14:27:23.118: E/AndroidRuntime(4919): FATAL EXCEPTION: main
01-04 14:27:23.118: E/AndroidRuntime(4919): Process: com.app.mfp.mfpapp, PID: 4919
01-04 14:27:23.118: E/AndroidRuntime(4919): java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.saikhuan.mfp.mfpapp-2/base.apk"],nativeLibraryDirectories=[/data/app/com.saikhuan.mfp.mfpapp-2/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libstlport_shared.so"
01-04 14:27:23.118: E/AndroidRuntime(4919):     at java.lang.Runtime.loadLibrary(Runtime.java:367)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at java.lang.System.loadLibrary(System.java:1076)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:141)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:136)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.worklight.jsonstore.database.DatabaseManager.openDatabaseIfNecessary(DatabaseManager.java:179)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.worklight.jsonstore.database.DatabaseManager.checkDatabaseAgainstSchema(DatabaseManager.java:98)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.worklight.jsonstore.database.DatabaseSchema.isSchemaMismatched(DatabaseSchema.java:417)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.worklight.jsonstore.api.WLJSONStore.provisionDatabase(WLJSONStore.java:150)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.worklight.jsonstore.api.WLJSONStore.openCollections(WLJSONStore.java:347)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.worklight.jsonstore.api.WLJSONStore.openCollections(WLJSONStore.java:372)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.saikhuan.mfp.mfpapp.MainActivity$4.onClick(MainActivity.java:125)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at android.view.View.performClick(View.java:5198)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at android.view.View$PerformClick.run(View.java:21147)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at android.os.Handler.handleCallback(Handler.java:739)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at android.os.Handler.dispatchMessage(Handler.java:95)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at android.os.Looper.loop(Looper.java:148)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at android.app.ActivityThread.main(ActivityThread.java:5417)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at java.lang.reflect.Method.invoke(Native Method)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-04 14:27:23.118: E/AndroidRuntime(4919):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
SaiKhuan
  • 21
  • 3

1 Answers1

2

If you are creating an application on Android Studio you need to specify where the libs folder is located because by default .so files are loaded under the jniLibs directory.

For more information you should look at this answer in StackOverflow. Also, you can specify the source directory of the jniLibs by setting it in your build.gradle file.

sourceSets {
   main {
     jniLibs.srcDir = ['libs']
   }
 }

within

android
{

}
Community
  • 1
  • 1
Namfo
  • 301
  • 2
  • 8