isHardwareDetected() 및 hasEnrolledFingerprints()는 항상 false를 반환합니다. 타겟 API 24가 정상적으로 작동한다는 것을 알았습니다. 25 번 문제입니다. 최신 API를 사용하고 싶지만 지문 인식 기능이 없으면 불가능합니다.FingerprintManagerCompat isHardwareDetected는 targetAPI에서 false를 반환합니다. 25
활동
FingerprintManagerCompat from = FingerprintManagerCompat.from(getApplication());
boolean hardwareDetected = from.isHardwareDetected();
boolean b = from.hasEnrolledFingerprints();
app.gradle
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.tkuhn.myapplication"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.2.0'
testCompile 'junit:junit:4.12'
}
는 https://issuetracker.google.com/issues/37132365 –