gpt4 book ai didi

android - FingerprintManager.isHardwareDetected() 仅在 Android Oreo 上崩溃

转载 作者:太空狗 更新时间:2023-10-29 15:28:00 25 4
gpt4 key购买 nike

当手动请求指纹传感器权限时,oreo 对话框不显示。

我已经在 Manifest 中列出了 USE_FINGERPRINT 权限,但仍然出现异常

    W/System.err: java.lang.SecurityException: Must have android.permission.USE_FINGERPRINT permission.: Neither user 10190 nor current process has android.permission.USE_FINGERPRINT.
at android.os.Parcel.readException(Parcel.java:2004)
at android.os.Parcel.readException(Parcel.java:1950)
at android.hardware.fingerprint.IFingerprintService$Stub$Proxy.isHardwareDetected(IFingerprintService.java:465)
at android.hardware.fingerprint.FingerprintManager.isHardwareDetected(FingerprintManager.java:835)
at ""ui.biometricAuth.BiometricAuth.getFingerPrintAuthError(BiometricAuth.java:174)
at ""ui.biometricAuth.BiometricAuth.isTouchIDEnabled(BiometricAuth.java:225)
at ""ui.usermanagement.LoginActivity.onCreate(LoginActivity.java:403)
at android.app.Activity.performCreate(Activity.java:7036)
at android.app.Activity.performCreate(Activity.java:7027)
W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1231)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2989)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1688)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6753)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:482)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

最佳答案

我之前添加的权限如下

<uses-permission
android:name="android.permission.USE_FINGERPRINT"
android:requiredFeature="false" />

现在删除 android:requiredFeature="false"并仅添加

<uses-permission android:name="android.permission.USE_FINGERPRINT" />

适用于所有操作系统版本。

关于android - FingerprintManager.isHardwareDetected() 仅在 Android Oreo 上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50717346/

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