Biometric authentication with FingerprintAIO

I am trying to implement the authentication of my Ionic v4 application through the fingerprint-aio plugin.

I’m use android-cordava@9.0.0 as below:

ionic cordova platform add android@9.0.0

fiz a instalação do plugin FingerPrint AIO conforme a documentação (Fingerprint AIO - Ionic Documentation).

ionic cordova plugin add cordova-plugin-fingerprint-aio
npm install @ionic-native/fingerprint-aio

however, when I try to build the application:

ionic cordova build android

the build fails and displays the message below:

[Gradle Properties] Detected Gradle property “android.useAndroidX” with the value of “true”, Cordova’s recommended value is “false”
[Gradle Properties] Detected Gradle property “android.enableJetifier” with the value of “true”, Cordova’s recommended value is “false”
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Users\xxxxx\AppData\Local\Android\Sdk (recommended setting)
ANDROID_HOME=C:\Users\xxxxx\AppData\Local\Android\Sdk (DEPRECATED)
Using Android SDK: C:\Users\xxxxx\AppData\Local\Android\Sdk

BUILD SUCCESSFUL in 2s
1 actionable task: 1 executed
Subproject Path: CordovaLib
Subproject Path: app

Configure project :app
WARNING: Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ and ‘api’.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see http://d.android.com/r/tools/update-dependency-configurations.html.

Task :app:compileDebugJavaWithJavac FAILED
C:\git\BIB.IB.Mobile\platforms\android\app\src\main\java\com\ionicframework\cordova\webview\IonicWebViewEngine.java:11: error: package android.support.annotation does not exist
import android.support.annotation.RequiresApi;
^
C:\git\BIB.IB.Mobile\platforms\android\app\src\main\java\io\github\pwlin\cordova\plugins\fileopener2\FileProvider.java:28: error: package android.support.v4.content does not exist
public class FileProvider extends android.support.v4.content.FileProvider {
^
C:\git\BIB.IB.Mobile\platforms\android\app\src\main\java\nl\xservices\plugins\FileProvider.java:4: error: package android.support.v4.content does not exist
public class FileProvider extends android.support.v4.content.FileProvider {
^
C:\git\BIB.IB.Mobile\platforms\android\app\src\main\java\com\ionicframework\cordova\webview\IonicWebViewEngine.java:122: error: cannot find symbol
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
^
symbol: class RequiresApi
location: class IonicWebViewEngine.ServerClient
C:\git\BIB.IB.Mobile\platforms\android\app\src\main\java\io\github\pwlin\cordova\plugins\fileopener2\FileOpener2.java:114: error: cannot find symbol
path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + “.opener.provider”, file);
^
symbol: method getUriForFile(Context,String,File)
location: class FileProvider
C:\git\BIB.IB.Mobile\platforms\android\app\src\main\java\io\github\pwlin\cordova\plugins\fileopener2\FileOpener2.java:122: error: cannot find symbol
Uri path = FileProvider.getUriForFile(context, cordova.getActivity().getPackageName() + “.opener.provider”, file);
^
symbol: method getUriForFile(Context,String,File)
location: class FileProvider
C:\git\BIB.IB.Mobile\platforms\android\app\src\main\java\nl\xservices\plugins\SocialSharing.java:169: error: cannot find symbol
fileUri = FileProvider.getUriForFile(webView.getContext(), cordova.getActivity().getPackageName()+".sharing.provider", new File(fileUri.getPath()));
^
symbol: method getUriForFile(Context,String,File)
location: class FileProvider
C:\git\BIB.IB.Mobile\platforms\android\app\src\main\java\nl\xservices\plugins\SocialSharing.java:285: error: cannot find symbol
fileUri = FileProvider.getUriForFile(webView.getContext(), cordova.getActivity().getPackageName()+".sharing.provider", new File(fileUri.getPath()));
^
symbol: method getUriForFile(Context,String,File)
location: class FileProvider
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
8 errors

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:compileDebugJavaWithJavac’.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface

BUILD FAILED in 15s
25 actionable tasks: 25 executed
Command failed with exit code 1: c:\git\BIB.IB.Mobile\platforms\android\gradlew cdvBuildDebug -b c:\git\BIB.IB.Mobile\platforms\android\build.gradle

My ionic info:

Ionic:

ionic (Ionic CLI) : 4.11.0 (C:\Users\camilaba\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.4

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 9.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 12 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\camilaba\AppData\Local\Android\Sdk)
NodeJS : v14.16.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.11
OS : Windows 10

I can resolve this using:

ionic cordova plugin add cordova-plugin-androidx-adapter
npm i cordova-plugin-androidx-adapter