java.lang.UnsatisfiedLinkError:
dalvik.system.PathClassLoader[DexPathList[[zip file
"/data/app/com.example.sqlcipher_demo-1/base.apk"],nativeLibraryDirectories=[/vendor/lib,
/system/lib]]] couldn't find "libsqlcipher_android.so"
I am getting this error. i added all the jar files in libs folder n able to see .so files in all the folders. those jar files are also added in build.gradle file.
source : https://www.zetetic.net/sqlcipher/sqlcipher-for-android/
Finally I got the answer for this....
If you maintain your project structure as mentioned below it will work
Image
For further steps I followed
https://androidbycode.wordpress.com/2015/02/18/android-database-encryption-using-sqlcipher/
and now its working fine.
Related
I'm having trouble linking some files to my project. It's an android studio project and I want to link one external file: "Emv_lib.so" (I know that are some questions on how to link .so files, but those are about internal .so files, this is an external one.)
Beside this file, I have an emv_lib.lib and emvIIapi.h (the header file that actually contains the functions that i need to call). I cannot get this to work. I tried with CMakeList, putting the emvIIapi.h file in there, but it comes with the error: "Execution failed for task ':app:configureCMakeDebug'.
C/C++"
I follow some suggestion, to create in src/main the folder jniLibs and put your .so files in there, but it didn't work.
From my undestanding, I have to compile, somehow, either the .so files or the .lib file.
I'm new to android studio, so don't go hard on me. Thank you for your time!
Can any one help me solve this particular issue, below is the error log:
java.Lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/hprt_printer_test.hprt_printer_test-1/base.apk"],nativeLibraryDirectories=[/data/app/hprt_printer_test.hprt_printer_test-1/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libhprt_printer_model.so.
I searched through almost all the posts at StackOverflow but could not solve the issue.
Basically, I am trying to embed a jar file in a binding project and then use the .dll file in my project. For Information the structure of the binding project is
the binding project
The structure of the project is as follows
The project structure
so is there any solution?
Thanks
Xamarin looks for your library .so files, in the specific folder called libs.
In your project structure you have folders called system, vendor. Inside these you have .so files as well. You have to place all these under libs folder.
Please refer this link : https://forums.xamarin.com/discussion/106178/how-to-access-dll-or-so-files-in-an-android-project
Hope this helps!!
I'm trying to build tutorial-2-mixedprocess application (in android-studio) that came with the opencv-SDK 3.2.0. But my application crashes because of a missing mixed_sample library
// Load native library after(!) OpenCV initialization
System.loadLibrary("opencv_java3"); //This one is taken care in CmakeLists.txt
Log.d(TAG, "Loaded the opencv"); //This line appears on the monitor
System.loadLibrary("mixed_sample"); // C-R-A-S-H h h h
I looked inside OpenCV-android-sdk/sdk/native/libs directory that came with opencv-3.2.0-android-sdk.zip but *mixed_sample.so is nowhere to be found.
Where to find this file?
EDIT
The full error says following:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.opencv.samples.tutorial2-1/base.apk"],nativeLibraryDirectories=[/data/app/org.opencv.samples.tutorial2-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libmixed_sample.so"
In Android Studio do the following
Create Folder "jniLibs" inside "src/main/"
Put all your .so libraries inside "src/main/jniLibs" folder
just sync gradle again and project. Run your application.
make sure you have put java and jnilibs at proper places.
can you share tree structure of project screenshot?
I am trying to add armeabi .so files in my Android Studio project. Which will be accessed by .jar files of an SDK. Basically I am using Brothers Printers SDK and integrating them in my app. THe problem is, the .jar files are picked up in the Android Studio Project but when I try to access a method of the SDK, it gives me this error:
java.lang.UnsatisfiedLinkError: Couldn't load createdata from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.wingoku.printerapp-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.wingoku.printerapp-1, /vendor/lib, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
at com.brother.ptouch.sdk.JNIWrapper.<clinit>(JNIWrapper.java:16)
at com.brother.ptouch.sdk.Printer.setPrinterInfo(Printer.java:887)
at com.wingoku.printerapp.print.printprocess.BasePrint.setPrinterInfo(BasePrint.java:73)
at com.wingoku.printerapp.print.printprocess.BasePrint$PrinterThread.run(BasePrint.java:433)
I have tried putting the armeabi folder inside the src/main/jniLibs but the .so files are not getting picked up and I keep getting the mentioned exception.
What can I do resolve it?
The method which helped me is:
make a directory on your desktop name it 'lib'
take your jnilibs folders with *.so files and paste it in lib.
now zip your lib folder
and then change its extention from .zip to .jar
that is lib.zip to lib.jar
now copy this into your libs folder of your project and update you gradle by adding this line in dependencies:
compile fileTree(include: 'lib.jar',dir:'libs')
this is the safest method to load any jnilibs. i applied it with opencv libs
if also problem persists add reference of NDK-root in your app.
hope this helps.
I am new to the Card-io library. I have downloaded the library from here here. I have converted the .aar to .jar file and added to my project, in the libs folder. I followed the tutorial which is provided in the above link. I encounter the following problems:
I get the following error on the LogCat :
Failed to load native library: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.creditcardscanner-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libcardioDecider.so
When the button click is fired, I get a page that asks for the Card details like the cardnumber and expiry date.
Can anyone please guide me, where I am going wrong?
I think you have not added the libcardioDecider.so files. Copy the aremaabi folders that are present in the jni folders into your libs folder. It should work.