简体   繁体   中英

How to add prebuilt .so library in android studio 0.8.6

The Error I will get is

Couldn't load json from loader dalvik.system.PathClassLoader[DexPathList[dexElements=[zip file "/data/app/com.uei.tools.ndktest-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.uei.tools.ndktest-1, /vendor/lib, /system/lib]]]: findLibrary returned null

I created a zip file of all .so files and i added into libs folder under app folder i added jar dependency from Module settings dependency.

All serch resulted in sample code of old versions of android studio but there is no sample for Android studio 0.8.6 beta

With Android Studio 0.8.x, you can directly add your prebuilt .so files under a jniLibs folder, inside folders corresponding to each ABIs. For example:

  • app/src/main/jniLibs/armeabi-v7a/libMyLib.so
  • app/src/main/jniLibs/x86/libMyLib.so

You can find up-to-date samples at the bottom of this page: http://tools.android.com/tech-docs/new-build-system#sites-attachments

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM