hieuvp / react-native-fingerprint-scanner

Provide Fingerprint, Touch ID, and Face ID Scanner for React Native (Compatible with both Android and iOS)
https://www.npmjs.com/package/react-native-fingerprint-scanner
870 stars 298 forks source link

Failed to build for Android with compileSdkVersion 30 #218

Open mmkhmk opened 1 year ago

mmkhmk commented 1 year ago

I got the following error in Android build.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkDevDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
   > The minCompileSdk (31) specified in a
     dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
     is greater than this module's compileSdkVersion (android-30).
     Dependency: androidx.biometric:biometric:1.2.0-alpha04.
     AAR metadata file: /Users/erika.tayama/.gradle/caches/transforms-3/f404b9545f67b9de464f9067c770604c/transformed/biometric-1.2.0-alpha04/META-INF/com/android/build/gradle/aar-metadata.properties.

compileSdkVersion is 30 in our app and we can't update it because of dependencies for now. Is there any ways to use this library with compileSdkVersion 30?

mikehardy commented 1 year ago

I don't see how androidx.biometric dependency came in at 1.2.0-alpha04. It should be at 1.1.0. https://github.com/hieuvp/react-native-fingerprint-scanner/blob/9cecc0db326471c571553ea85f7c016fee2f803d/android/build.gradle#L46

Then it most likely would only need compileSdkVersion 30. Bumping to JDK11 + compileSdkVersion 31 should be a very high priority for you, everything is moving to that as a baseline at the moment so you'll lose access to current versions of many modules I know about at least, if you can't access it

BraveEvidence commented 1 year ago

Check my video https://www.youtube.com/watch?v=DAZJ2JhDkNU. It will help you