私はreact-native run-android
を実行していますが、コンパイル時にこのエラーが発生します。反応ネイティブrun-androidを実行しているときにMainActivity.javaでエラーが発生する
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.)
MainActivity.java:37: error: method does not override or implement a method from a supertype @Override ^ 1 error :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
私は本当にどのように進めるのかわからないので、どんな提案も大歓迎です。
私がインストールされている:
- のjavac 1.8.0_101
- 反応ネイティブ-CLI:1.0.0
- 反応し、ネイティブ:0.32.0
EDIT
これはMainActivity.javaです
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponentName() {
return "netbeast";
}
/**
* Returns whether dev mode should be enabled.
* This enables e.g. the dev menu.
*/
@Override
protected boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
/**
* A list of packages used by the app. If the app uses additional views
* or modules besides the default ones, add more packages here.
*/
@Override **//This is the line 37 where the error occurs**
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new VectorIconsPackage(),
new UdpSocketsModule(),
new RNNetworkInfoPackage()
);
}
}
コンパイラが不平を言っているmainActivity.javaの37行目を確認してください。 – lsiva
mainActivity.javaファイルを追加しました;) – LuisPinto
どの行が37ですか?あなたのコードサンプルに37行の合計行があるとは思わない。 – dckuehn