UsatisfiedLinkError while using BridJ with Android

788 views Asked by At

Currently I am using BRIDj-0.6.1-android.jar for Android. The problem is that the library shows an unsatisfied link error as follows:

09-27 17:51:58.740: E/AndroidRuntime(12589): Caused by: java.lang.ExceptionInInitializerError
09-27 17:51:58.740: E/AndroidRuntime(12589):    at java.lang.Class.newInstanceImpl(Native Method)
09-27 17:51:58.740: E/AndroidRuntime(12589):    at java.lang.Class.newInstance(Class.java:1472)
09-27 17:51:58.740: E/AndroidRuntime(12589):    at org.bridj.BridJ.getRuntimeByRuntimeClass(BridJ.java:233)
09-27 17:51:58.740: E/AndroidRuntime(12589):    at org.bridj.BridJ.getRuntime(BridJ.java:264)
09-27 17:51:58.740: E/AndroidRuntime(12589):    at org.bridj.BridJ.register(BridJ.java:287)
09-27 17:51:58.740: E/AndroidRuntime(12589):    at org.bridj.BridJ.register(BridJ.java:161)
09-27 17:51:58.740: E/AndroidRuntime(12589):    at com.g5.jna.crypto.LibcryptoLibrary.<clinit>(LibcryptoLibrary.java:20)
09-27 17:51:58.740: E/AndroidRuntime(12589):    ... 6 more
09-27 17:51:58.740: E/AndroidRuntime(12589): Caused by: java.lang.ExceptionInInitializerError
09-27 17:51:58.740: E/AndroidRuntime(12589):    at org.bridj.CRuntime.<clinit>(CRuntime.java:450)
09-27 17:51:58.740: E/AndroidRuntime(12589):    ... 13 more
09-27 17:51:58.740: E/AndroidRuntime(12589): Caused by: java.lang.UnsatisfiedLinkError: sizeOf_ptrdiff_t
09-27 17:51:58.740: E/AndroidRuntime(12589):    at org.bridj.Platform.sizeOf_ptrdiff_t(Native Method)
09-27 17:51:58.740: E/AndroidRuntime(12589):    at org.bridj.Platform.<clinit>(Platform.java:149)

I have kept libcrypto.so file in lib/armeabi/ path of my Android project.

How do I solve this?

1

There are 1 answers

1
chatellier On

There is an opened issue about this: https://github.com/ochafik/nativelibs4java/issues/335