I am self-taught in Android, using Studio 2.1 and trying to get the app working on API version 23.
I am using ZBAR barcode scanner, to scan the barcodes of books and then do a lookup of the ISBN code.
This all works nicely in lower API versions. When I get to 23 there is a documented change to how Android works with a particular component.
And here is the rub - I don't understand what I need to do to fix it.
FATAL EXCEPTION: main
Process: arw.apps.barcode, PID: 24533
java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/arw.apps.barcode-1/lib/arm/libiconv.so: has text relocations
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at arw.apps.barcode.ZBarScannerActivity.<clinit>(ZBarScannerActivity.java:29)
at java.lang.Class.newInstance(Native Method)
at android.app.Instrumentation.newActivity(Instrumentation.java:1068)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2351)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2520)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5466)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
The app compiles right, and this happens when I try to activate the camera to perform the barcode scan.
I see the DLOpen Fail error, referring to text relocations. I have read up that Android has been warning about this for a while, and in 6.0 its has not stopped working.
For good measure, I can confirm this code is present:
static {
System.loadLibrary("iconv");
}
And this is in my .build file
dependencies {
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile files ('libs/zbar.jar')
compile files('libs/org.apache.http.legacy.jar')
What other artifacts can I post here to help you help me :-)
Grateful in advance for asistance
Alex