任务 ':react-native-lock:compileDebugJavaWithJavac' 执行失败

Execution failed for task ':react-native-lock:compileDebugJavaWithJavac'

我的应用程序构建失败,因为 react-native-lock 是一个已弃用的库。但这仅发生在 android 中。它在 iOS 上构建并成功运行。它给出以下错误:

Task :react-native-lock:compileDebugJavaWithJavac FAILED /Users/abc/appname/node_modules/react-native-lock/android/src/main/java/com/auth0/lock/react/LockReactPackage.java:146: error: method does not override or implement a method from a supertype @Override ^ Note: /Users/abc/appname/node_modules/react-native-lock/android/src/main/java/com/auth0/lock/react/bridge/UserProfileBridge.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error

这个问题困扰我很久了。任何帮助将不胜感激。它的 app/build.gradle 看起来像这样:

dependencies {
    compile project(':realm')
    implementation project(':realm')
    compile project(':react-native-vector-icons')
    implementation project(':react-native-vector-icons')
    compile project(':react-native-lock')
    implementation project(':react-native-lock')
    compile project(':react-native-firebase')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:28.0.0"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation project(':react-native-firebase')
}

我的package.json依赖如下:

"dependencies": {
    "@expo/ex-navigation": "^3.1.0",
    "babel-preset-react-native-stage-0": "^1.0.1",
    "firebase": "^4.8.0",
    "moment": "^2.22.1",
    "react": "16.0.0",
    "react-moment": "^0.7.0",
    "react-native": "0.55.0",
    "react-native-firebase": "^5.2.3",
    "react-native-loading-spinner-overlay": "^0.5.2",
    "react-native-lock": "^0.4.0",
    "react-native-popup-dialog": "^0.16.6",
    "react-native-step-indicator": "0.0.7",
    "react-native-swipe-list-view": "^1.3.1",
    "react-native-vector-icons": "^4.4.2",
    "react-redux": "^5.0.6",
    "realm": "^10.0.0-beta.6",
    "redux": "^3.7.2",
    "redux-thunk": "^2.2.0"
  },

其项目级别build.gradle:

dependencies {
        classpath 'com.android.tools.build:gradle:3.2.0'
        classpath 'com.google.gms:google-services:4.0.1'
    }

我使用的gradle版本是4.9。 JDK 版本是 11.

您是否正在使用这个已折旧的生物识别库?