简体   繁体   中英

Loading .so files crashed on some android devices

When i am trying to load my .SO files from libs by using the System.loadLibrary("myfile") i am getting the following exception.

java.lang.UnsatisfiedLinkError: 
Couldn't load stlport_shared from loader dalvik.system.PathClassLoader
[DexPathList[[zip file "/data/app/com.package.name-2.apk"],
nativeLibraryDirectories=
[/data/app-lib/com.package.name-2, /system/lib]]]: 
findLibrary returned null

I am getting this exception on some devices only. please help me.

Under the Libs folder create the following folders armeabi, armeabi-v7a, x86, mips then copy the .So file into the respective folders. clean the project then run.

These folders under the libs (armeabi, armeabi-v7a, x86, mips) are selected at runtime depends on the processors.

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