当我尝试运行指纹验证的示例应用时,会抛出以下异常。
我尝试过的设备有:
三星S5 (Android 6.0.1 API 23)
我尝试过的设备有:
三星S5 (Android 6.0.1 API 23)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: java.security.InvalidAlgorithmParameterException: java.lang.IllegalStateException: At least one fingerprint must be enrolled to create keys requiring user authentication for every use
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.security.keystore.AndroidKeyStoreKeyGeneratorSpi.engineInit(AndroidKeyStoreKeyGeneratorSpi.java:238)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.security.keystore.AndroidKeyStoreKeyGeneratorSpi$AES.engineInit(AndroidKeyStoreKeyGeneratorSpi.java:53)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at javax.crypto.KeyGenerator.init(KeyGenerator.java:189)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at com.netfinitymedia.notubeapp.authentication.VerificationActivity.generateKey(VerificationActivity.java:177)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at com.netfinitymedia.notubeapp.authentication.VerificationActivity.initialize(VerificationActivity.java:131)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at com.netfinitymedia.notubeapp.authentication.VerificationActivity.onCreate(VerificationActivity.java:63)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.app.Activity.performCreate(Activity.java:6876)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.app.ActivityThread.access$1100(ActivityThread.java:221)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.os.Looper.loop(Looper.java:158)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7224)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at java.lang.reflect.Method.invoke(Native Method)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: Caused by: java.lang.IllegalStateException: At least one fingerprint must be enrolled to create keys requiring user authentication for every use
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.security.keystore.KeymasterUtils.addUserAuthArgs(KeymasterUtils.java:115)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: at android.security.keystore.AndroidKeyStoreKeyGeneratorSpi.engineInit(AndroidKeyStoreKeyGeneratorSpi.java:234)
07-08 03:31:57.796 30558-30558/com.netfinitymedia.notubeapp W/System.err: ... 17 more