android模拟器打开,但不显示任何内容
npm run android
> hello@0.0.1 android
> react-native run-android
info Starting JS server...
* daemon not running; starting now at tcp:5037
* daemon started successfully
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
5 actionable tasks: 5 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> java.io.IOException: La syntaxe du nom de fichier, de r�pertoire ou de volume est incorrecte
* 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 36s
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:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> java.io.IOException: La syntaxe du nom de fichier, de r�pertoire ou de volume est incorrecte
* 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 36s
at makeError (C:\Users\jawhar\Desktop\First_React\hello\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Users\jawhar\Desktop\First_React\hello\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\jawhar\Desktop\First_React\hello\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7)
at async Command.handleAction (C:\Users\jawhar\Desktop\First_React\hello\node_modules\@react-native-community\cli\build\index.js:108:9)
info Run CLI with --verbose flag for more details.
1条答案
按热度按时间vltsax251#
我想我知道发生了什么。
此消息:
我有时也会遇到这个错误,这是因为Android Studio默认将模拟器的大小设置为相当低的存储空间。
1.进入Android Studio(如果您正在一个项目中,请退出它,这样您将只拥有IDE的菜单)
1.挑三个点
1.选择虚拟设备管理器
1.编辑AVD
1.显示高级设置
1.选择"无SD卡"并使内部存储至少为2000MB
干杯