[英]React Native - error: method does not override or implement a method from a supertype
React Native throws these errors when compiling... React Native在编译时会抛出这些错误......
MainActivity.java:26: MainActivity.java:26:
MainActivity.java:35: MainActivity.java:35:
error: method does not override or implement a method from a supertype error:方法不会覆盖或实现超类型的方法
How should these two functions be changed? 这两个功能应该如何改变?
public class MainActivity extends ReactActivity {
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new BeaconsAndroidPackage()
);
}
}
Thanks! 谢谢!
Normally you just need to comment out the @Override decorator in MainActivity.java and it should work fine. 通常你只需要在MainActivity.java中注释掉@Override装饰器,它应该可以正常工作。 Try it.
试试吧。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.