gaoyangcr7 / BiometricPromptDemo

Android fingerprint, Api23 and Api28 are supported
145 stars 51 forks source link

Build failed #1

Closed thangkho closed 6 years ago

thangkho commented 6 years ago

When I download your app and build in android studio it fail Error:Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. FAILURE: Build failed with an exception.

BUILD FAILED in 58s How I can fix it?

gaoyangcr7 commented 6 years ago

What is your compile sdk version? It must be 28

thangkho commented 6 years ago

apply plugin: 'com.android.application'

android { compileSdkVersion 28 defaultConfig { applicationId "gaoyang.biometricdemo" minSdkVersion 23 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:28.0.0-alpha3' implementation 'com.android.support.constraint:constraint-layout:1.1.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation project(':biometriclib') } I download your app and not edit.

gaoyangcr7 commented 6 years ago

Try this:https://stackoverflow.com/questions/49915775/failed-to-find-byte-code-for-android-hardware-fingerprint-fingerprintmanageraut

just disable Instant Run

thangkho commented 6 years ago

Thank you! a marginal question: In blog https://android-developers.googleblog.com/2018/06/better-biometrics-in-android-p.html. Bimometrics have support for android O or lower if import library. Where I can get BimometricPrompt compat library and they said Biometricprompt can suppor for face and iris but when I read in document https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt. I can't see support for iris or face. Biometricprompt is really support for iris and face?

gaoyangcr7 commented 6 years ago

【FingerprintManager】have support for Api23 ~ Api27。 【FingerprintManagerCompat】in the support v4 lib,it is a wrapper for FingerprintManager。 Above Api28,FingerprintManager was deprecated,replaced by【BiometricPrompt】,but Biometricprompt still hasn't seen support iris or face interface

thangkho commented 6 years ago

It mean if api <28 I can't use BiometricPrompt?

gaoyangcr7 commented 6 years ago

Yes!

thangkho commented 6 years ago

thank you so much! good luck