Android - 在Android API 17中使用指纹API

Ahm*_*bed 5 android android-6.0-marshmallow

最近,谷歌允许开发人员在Android 6.0(API 23)中使用指纹API.

我有与Android项目compiledSdkVersion 23minSdkVersion 17.

我的问题是:我可以在我的项目中使用Fingerprint API,我试图在我的项目中使用Google示例,但我有以下错误消息:

Class Requires API level 23 (current min is 17)
Run Code Online (Sandbox Code Playgroud)

如果我能,我会感激任何人给我一个很好的教程.

谢谢

nit*_*arp 5

您可以使用Support Library v4来支持小于23的minSdk.您必须相应地使用类名,例如FingerprintManagerCompat等.

检查这个github样本