How to add prebuilt .so library in android studio 0.8.6

邮差的信 提交于 2020-01-15 10:17:12

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/25724999/how-to-add-prebuilt-so-library-in-android-studio-0-8-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!