我已经添加react-native-fbsdk
到我的 react native 项目中,并让它在 iOS 上构建良好。但在 android 方面,我无法获得 gradle 来构建项目。在尝试编译 react-native-fbsdk 时,我遇到了:“方法不会覆盖或实现超类型中的方法”
21:41:11.863 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API.
21:41:12.100 [ERROR] [system.err] /Users/joncursi/Sites/joncursi/redbirdNative/node_modules/react-native-fbsdk/android/src/main/java/com/facebook/reactnative/androidsdk/FBSDKPackage.java:61: error: method does not override or implement a method from a supertype
它指向 react-native-fbsdk 中的以下代码片段:
@Override
public List<Class<? extends JavaScriptModule>> createJSModules() {
return Collections.emptyList();
}
当我删除@Override
时,这个特定的错误实例消失了,但我在另一个模块中遇到了同样的错误,例如react-native-image-picker
:
:react-native-image-picker:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/joncursi/Sites/joncursi/redbirdNative/node_modules/react-native-image-picker/android/src/main/java/com/imagepicker/ImagePickerPackage.java:34: error: method does not override or implement a method from a supertype
@Override
^
1 error
我怀疑这是我本地设置的问题。关于这里可能有什么问题的任何想法?