我已将react-native-fbsdk添加到我的反应原生项目中并使其在iOS上正常生成。但在android方面,我无法获得gradle来构建项目。当试图编译反应,本机fbsdk,我打:“法不覆盖或实现从超的方法”React Native Android:方法不会覆盖或实现超类型的方法
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
指向反应,本机fbsdk内,下面的代码片段:
@Override
public List> 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
我怀疑这是我的本地设置的问题。任何想法可能是错误的?
+0
你是怎么解决这个问题?有一个简单的解决方法吗? –
+0
升级反应原生fbsdk –
+0
是的,我手动编辑软件包抛出错误.... –