react-native-navigation,"method does not override" for Android
react-native-navigation, "method does not override" for Android
嗨,当 运行 react-native run-android
:
时,我正在使用 RNN 得到以下信息
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
我正在使用
反应本机 cli:2.0.1
本机反应:0.51.0
如错误信息所述:您没有覆盖 NavigationApplication 抽象方法的方法。您必须添加:
@Override
public List<ReactPackage> createAdditionalReactPackages() {
return getPackages();
}
失踪了
@Override
public boolean isDebug() {
return BuildConfig.DEBUG;
}
嗨,当 运行 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
我正在使用 反应本机 cli:2.0.1 本机反应:0.51.0
如错误信息所述:您没有覆盖 NavigationApplication 抽象方法的方法。您必须添加:
@Override
public List<ReactPackage> createAdditionalReactPackages() {
return getPackages();
}
失踪了
@Override
public boolean isDebug() {
return BuildConfig.DEBUG;
}