嗨我在运行react-native run-android
:
MainApplication.java:22: error: MainApplication is not abstract and does not override abstract method createAdditionalReactPackages() in NavigationApplication
public class MainApplication extends NavigationApplication{
^
MainApplication.java:31: error: method does not override or implement a method from a supertype
@Override
^
我的MainApplication.java(代码段):https://pastebin.com/8eFNguPn
我正在使用 react-native-cli:2.0.1 反应原生:0.51.0
答案 0 :(得分:2)
如错误消息所示:您没有覆盖NavigationApplication的抽象方法的方法。你必须添加:
@Override
public List<ReactPackage> createAdditionalReactPackages() {
return getPackages();
}
答案 1 :(得分:0)
缺少
@Override
public boolean isDebug() {
return BuildConfig.DEBUG;
}