私はWindows 10でreact-nativeを実行していますが、私はたくさんの問題を抱えています。 まず、プロジェクトのルートディレクトリで、私はWindows 10での反応がネイティブなアンドロイドの問題
react-native run-android
を実行したときに、私はこのエラーを取得:
JS server already running. Building and installing the app on the device (cd android && gradlew.bat installDebug... Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html
そして--stacktrace --infoでそれを実行するには助けにはならなかったが。 私はその後、実行アンドロイドスクリプトは、Androidのディレクトリに行くことによって達成し、結果の束を生成するが、それでもエラーで終了したことを
cd android && gradlew.bat installDebug
を実行して、私の自己を構築しようとしているように見えるものを手動で行うことを決めました。
:app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). C:\Users\jiangyaokai\workspace\maincourse\android\app\src\main\java\com\maincourse\MainApplication.java:30: error: cannot find symbol new CodePush(this.getResources().getString(R.strings.reactNativeCodePush_androidDeploymentKey), this, BuildConfig.DEBUG), ^ symbol: variable strings location: class R C:\Users\jiangyaokai\workspace\maincourse\android\app\src\main\java\com\maincourse\MainApplication.java:30: error: cannot find symbol new CodePush(this.getResources().getString(R.strings.reactNativeCodePush_androidDeploymentKey), this, BuildConfig.DEBUG), ^ symbol: method getResources()
2 errors :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 8.109 secs
私は何が間違っているのだろうか?ありがとう。ここで
しかしCodePushだけでなく、R.stringsも問題を抱えているようですが、CodePushだけであれば削除できましたが、そうではありません。私はR.stringsがどのように認識されないのだろうかと思っています。 – user1380898
@ user1380898 'android /'の内部で 'gralew clean 'を試してください。 –
@Bajaこの 'gradlew clean'のために十分にあなたに感謝することはできません。 – Rudy