项目起不起来
来源:2-

月美
2021-07-19
PS C:\work\frame\react_native_app> react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using “–no-jetifier” flag.
Jetifier found 896 file(s) to forward-jetify. Using 8 workers…
info Starting JS server…
- daemon not running; starting now at tcp:5037
- daemon started successfully
info Launching emulator…
error Failed to launch emulator. Reason: Could not start emulator within 30 seconds…
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app…
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
Task :app:installDebug FAILED
Skipping device ‘emulator-5554’ (emulator-5554): Device is OFFLINE.
31 actionable tasks: 2 executed, 29 up-to-date
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:installDebug’.
com.android.builder.testing.api.DeviceException: No online devices found.
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 30s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:installDebug’.
com.android.builder.testing.api.DeviceException: No online devices found.
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 30s
at makeError (C:\work\frame\react_native_app\node_modules\execa\index.js:174:9)
at C:\work\frame\react_native_app\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async runOnAllDevices (C:\work\frame\react_native_app\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\work\frame\react_native_app\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)
info Run CLI with --verbose flag for more details.
PS C:\work\frame\react_native_app>
1回答
-
CrazyCodeBoy
2021-07-20
参照这个说明配置下Android开发环境:https://reactnative.dev/docs/environment-setup
00