Xamarin Android - couldn't find the .so file - android

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!!

Related

How I can use the .so File of another project into my own project

I want to use .so lib file of another project into my own project.
There i am facing some problems i have put the .so file in JNILibs folder.
but the native methods in the .so file did not successfully loaded and give error that the Can not find the corresponding JNI Function.
so how i can solve this problem i have checked different solutions like
Call shared library (.so) methods within Android Studios C files
How do I package .so files into my .aar archive?
but they did not solve my problem.
i have no .cpp file nor .h file.
I have only .so file so how i can solve this problem.
thanks in advance.

Android studio create .jar file instead of .aar file

Hi I followed android documentation to create a library. But my problem is whenever I run the project means it is creating .aar file. I google it and found How to convert AAR to JAR
this. I'm using iZip Unarchiver. But it is not extracting the .aar file.
But they accepted that answer. Can any one know how to extract .jar from .aar. Thank you.
You can directly generate jar file using android studio. Here is a good tutorial for this.

Error when tring to implement SQlcipher in android

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.

Using Card-io library asks for card details instead of calling up the camera for scanning

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.

Android:External Jar classes not found

I am trying to use an external library: Musicg Library.
It is an android compatible library as they claim.
Now I followed all the instructions in this post to import the jar into the android project but it doesn't recognize the classes defined the jar file.
Also I tried to follow various other posts but most of the posts are referring to keep the jar in libs folder which I have done already.
Moreover I have checked that the class inside the jar is public.
Can somebody help me in solving this problem?
Any help will be appreciated! :)
EDIT
I have already kept the .jar in the libs folder.And I couldn't resolve the problem.
You need to put the .jar file in a libs/ folder at the root of your Android project (at the same level as your AndroidManifest.xml.

Categories

Resources