当我点击扫描时,它的抛出错误就像,但以前的版本直到棒棒糖才有效。
java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/xxxxxxx-xxx/lib/arm/libiconv.so: has text relocations
at java.lang.Runtime.loadLibrary(Runtime.java:372)
at java.lang.System.loadLibrary(System.java:1076)
at me.dm7.barcodescanner.zbar.ZBarScannerView.<clinit>(ZBarScannerView.java:33)
at com.xxx.xxx.SimpleScannerActivity.onCreate(SimpleScannerActivity.java:101)
at android.app.Activity.performCreate(Activity.java:6248)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1125)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2437)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2544)
at android.app.ActivityThread.access$900(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1394)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:168)
at android.app.ActivityThread.main(ActivityThread.java:5845)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
执行以下代码时
static {
System.loadLibrary("iconv");
}
我的TargetSDK版本是23。如果我改为22工作正常
请做必要的
答案 0 :(得分:2)
答案 1 :(得分:-1)
我有一个解决方案,我知道它不是那么好,但它有效。
在您的应用程序gradle文件中将构建版本从23更改为。
替换
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
}
用
android {
compileSdkVersion 22
buildToolsVersion "22.0.0"
}