在棉花糖设备上找不到QRScanner库

时间:2017-02-13 06:06:41

标签: android

嗨,我在加载库zbar时收到此错误 zbar.jar和zxing-2.1jar位于app / libs下

libiconv.so和libzbarjni.so位于app / src / main / jniLibs / armeabi-v7a

我使用它来加载我的类

中的库
System.loadLibrary("iconv");

并将其添加到app level build.gradle

compile files('libs/zbar.jar')
compile files('libs/zxing-2.1.jar')

我的应用程序级别build.grade的设置,我无法将其更改为22或23,我已阅读一些来解决问题

compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
    applicationId "com.tagcash"
    minSdkVersion 15
    targetSdkVersion 21
    renderscriptSupportModeEnabled true
    multiDexEnabled true

任何人都有解决方案吗?如果版本是棒棒糖及以下,一切正常。如果版本是棉花糖它崩溃

整个堆栈跟踪

E/AndroidRuntime: FATAL EXCEPTION: main
                                                         Process: com.tagcash, PID: 27216
                                                         java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.tagcash-2/base.apk"],nativeLibraryDirectories=[/data/app/com.tagcash-2/lib/x86, /data/app/com.tagcash-2/base.apk!/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libiconv.so"
                                                             at java.lang.Runtime.loadLibrary(Runtime.java:367)
                                                             at java.lang.System.loadLibrary(System.java:1076)
                                                             at com.tagbond.activity.QRScannerActivity.<clinit>(QRScannerActivity.java:66)
                                                             at java.lang.Class.newInstance(Native Method)
                                                             at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
                                                             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
                                                             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
                                                             at android.app.ActivityThread.-wrap11(ActivityThread.java)
                                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
                                                             at android.os.Handler.dispatchMessage(Handler.java:102)
                                                             at android.os.Looper.loop(Looper.java:148)
                                                             at android.app.ActivityThread.main(ActivityThread.java:5417)
                                                             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)

谢谢,希望有人可以提供帮助。

0 个答案:

没有答案