Reputation: 606
I have created an Cordova Android 7 app while running app I get an error at
system.load("xxxx")
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader ......:couldn't find "xxxx.so"
in plugin.xml file I have defined jar and .so file like below :
<lib-file src="src/android/libs/xxxxx.jar"/>
<resource-file src="src/android/libs/armeabi/xxxx.so" target="libs/armeabi/xxxx.so" />
I hav tried all the possible ways by changing paths but no luck.What should be done to load library correctly ?
PS:The app works fine with cordova android version <7.
There is similar SO thread Add .so files to Cordova Plugin
Upvotes: 2
Views: 1016
Reputation: 606
I am able to resolve this issue by renaming libs to jniLibs.
Change
<resource-file src="src/android/libs/armeabi/xxxx.so"
target="libs/armeabi/xxxx.so"/>
to
<resource-file src="src/android/libs/armeabi/xxxx.so"
target="jniLibs/armeabi/xxxx.so"/>
Upvotes: 1