gpt4 book ai didi

java.lang.UnsatisfiedLinkError : Can't obtain class com. sun.jna.Pointer(神经技术Megamatcher SDK)

转载 作者:行者123 更新时间:2023-12-02 09:41:56 25 4
gpt4 key购买 nike

我想尝试将多生物识别示例 android(来自 https://www.neurotechnology.com/download.html#megamatcher_verifinger_verilook_verieye_sdk_trial )合并到我的项目中。

我已经将源代码复制到我的项目中,并添加所有 gradle 依赖项。构建apk时,出现此错误:

java.lang.UnsatisfiedLinkError: Can't obtain class com.sun.jna.Pointer

当我调试错误时,错误发生在尝试调用此代码时:

NLicenseManager.setTrialMode(LicensingPreferencesFragment.isUseTrial(this));

如果我评论该代码,同样的错误仍然出现,但在此代码中:

NCore.setContext(this);

这是我的 gradle 实现库:

//for my project
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'

implementation 'com.android.support:mediarouter-v7:27.1.1'
implementation 'org.greenrobot:greendao:3.2.2'
implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.0.2'
implementation 'com.jakewharton:butterknife:7.0.1'

implementation 'com.google.firebase:firebase-appindexing:17.1.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.journeyapps:zxing-android-embedded:3.6.0'
implementation 'com.google.zxing:core:3.3.2'

implementation 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'

implementation files('libs/volley.jar')
implementation files('libs/httpclient-4.5.2.jar')
implementation files('libs/httpcore-4.4.4.jar')
implementation files('libs/httpmime-4.5.2.jar')

implementation files('libs/commons-io-2.6.jar')
implementation 'com.hrules:horizontalnumberpicker:1.1.1'
implementation 'com.afollestad.material-dialogs:commons:0.9.6.0'
implementation 'com.github.cdflynn:checkview:v1.1'
api 'io.jsonwebtoken:jjwt-api:0.10.5'
runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.10.5'
runtimeOnly('io.jsonwebtoken:jjwt-orgjson:0.10.5') {
exclude group: 'org.json', module: 'json'
}



// for megamatcher multiobiometric
implementation ":neurotec-biometrics-client-android"
implementation ":neurotec-devices-fscanners-nitgen-android"
implementation ":neurotec-devices-fscanners-aratek-android"
implementation ":neurotec-devices-fscanners-aratek-trustfinger-android"
implementation ":neurotec-devices-fscanners-suprema-biomini-android"
implementation ":neurotec-devices-fscanners-bluefin-android"
implementation ":neurotec-devices-multimodal-credenceid-android"
implementation ":neurotec-devices-fscanners-digitalpersona-uareu-android"
implementation ":neurotec-devices-fscanners-secugen-android"
implementation ":neurotec-devices-fscanners-futronic-android"
implementation ":neurotec-devices-fscanners-integratedbiometrics-android"
implementation ":neurotec-devices-fscanners-smufsbio-android"
implementation ":neurotec-devices-fscanners-startek-android"
implementation ":neurotec-devices-fscanners-nextbiometrics-android"
implementation ":neurotec-devices-fscanners-greenbit-android"
implementation ":neurotec-devices-fscanners-zkteco-android"
implementation ":neurotec-devices-irisscanners-iritech-irishield-android"
implementation ":neurotec-devices-irisscanners-mantra-android"
implementation ":neurotec-devices-media-android"
implementation ":neurotec-biometrics-android"
implementation ":neurotec-devices-android"
implementation(name:'neurotec-biometrics-gui-android', ext:'aar')
implementation project(":samples-utils")

//inside samples-utils
api ":neurotec-core-android"
api ":neurotec-licensing-android"
api ":neurotec-gui-android"
api ":neurotec-media-android"
api ":neurotec-media-processing-android"
api ":jna"
api "com.android.support:support-v4:27.1.1"
api(name:'neurotec-licensing-gui-android', ext:'aar')

我已经检查过我已经在 gradle 中调用了 jna jar 的实现,有人可以帮忙吗?

最佳答案

最后,有一天我发现问题是,如果我们的应用程序使用ShrinkResources true和minifyEnabled true,我们应该在我们的proguard规则中为megamatcher使用的所有库添加一些异常(exception),如下所示:

-keep class com.sun.jna.** { *; }

-keep class org.libusb.** { *; }

-keep class com.neurotec.** { *; }

-keep class cn.com.aratek.** { *; }

-keep class com.aratek.** { *; }
-keep class com.cognaxon.** { *; }

-keep class com.digitalpersona.uareu.** { *; }

-keep class com.futronictech.** { *; }

-keep class com.greenbit.** { *; }
-keep class com.integratedbiometrics.** { *; }
-keep class com.nextbiometrics.fingerprint.NXTSensor.** { *; }
-keep class com.SecuGen.** { *; }
-keep class com.smufsbio.** { *; }
-keep class com.startek.fp300u.** { *; }
-keep class com.android.biomini.** { *; }
-keep class com.suprema.** { *; }
-keep class com.zkteco.** { *; }
-keep class com.zkteco.** { *; }

-keep class com.iritech.** { *; }
-keep class com.mantra.mis100.** { *; }
-keep class com.credenceid.** { *; }
-keep class com.gstreamer.** { *; }

关于java.lang.UnsatisfiedLinkError : Can't obtain class com. sun.jna.Pointer(神经技术Megamatcher SDK),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57005617/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com