前提・実現したいこと
https://facebook.github.io/react-native/docs/getting-started
公式を参考にWindowsとAndroidを使い、React Nativeで開発を始めようとしています
ですが、最後のステップでreact-native run-android
を実行すると
なぜかJavaScriptが起動し以下のエラーが起こります。
エラーの解消法が分かる方がいれば宜しくお願い致します。
発生している問題・エラーメッセージ
C:\Windows\System32\f81_app_1> react-native run-android Starting JS server... Building and installing the app on the device (cd android && gradlew.bat installDebug)... Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain 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/getting-started.html Command failed: gradlew.bat installDebug Error: Command failed: gradlew.bat installDebug at checkExecSyncError (child_process.js:637:11) at Object.execFileSync (child_process.js:655:13) at runOnAllDevices (C:\Windows\System32\f81_app_1\node_modules\react-native\local-cli\runAndroid\runAndroid.js:299:19) at buildAndRun (C:\Windows\System32\f81_app_1\node_modules\react-native\local-cli\runAndroid\runAndroid.js:135:12) at isPackagerRunning.then.result (C:\Windows\System32\f81_app_1\node_modules\react-native\local-cli\runAndroid\runAndroid.js:65:12) at processTicksAndRejections (internal/process/next_tick.js:81:5) C:\Windows\System32\f81_app_1>cd android C:\Windows\System32\f81_app_1\android>gradle wrapper 'gradle' is not recognized as an internal or external command, operable program or batch file.
試したこと
http://ugu44.hatenablog.com/entry/2017/08/29/151932
上記のサイトを参考にしたのですが
'gradle' is not recognized as an internal or external command
となり、うまくいきません。
また
https://github.com/facebook/react-native/issues/22466
このサイトも発見したのですが、
1のbuild the gradle
がよくわからずうまくいかない状態です。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。