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



我的应用程序的构建失败,因为react本机锁是一个不推荐使用的库。但这种情况只发生在安卓系统中。它在iOS上成功构建并运行。它给出以下错误:

任务:react native lock:compileDebugJavaWithJavac FAILED/Users/abc/appname/node_modules/areact native-lock/android/src/main/java/com/auth0/lock/areact/LockReactPackage.java:146:error:方法不重写或实现超类型的方法@Override^注意:/Users/abc/appname/node_modules/areact native lock/android/src/main/java.com/auth0/lock/areact/bridge/UserProfileBridge.java使用未检查或不安全的操作。注意:使用-Xlint重新编译:有关详细信息,请取消选中。1个错误

我为这个问题纠结了这么久。如有任何帮助,我们将不胜感激。它的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

您是否使用此折旧库进行生物识别?

最新更新