繁体   English   中英

运行react-native run-android时遇到问题

[英]Having issues running react-native run-android

由于我已经安装了react-native-vector-icons,因此在尝试在Android上运行该应用程序时遇到了麻烦。

这是当我尝试react-native run-android命令时显示的内容:

失败:构建失败,发生异常。

  • 出了什么问题:配置项目':react-native-vector-icons'时出现问题。

    无法解析配置':react-native-vector-icons:classpath'的所有依赖项。 无法从C:\\ Users \\ Pichau.gradle \\ caches \\ modules-2 \\ metadata-2.71 \\ descriptors \\ org.jetbrains.kotlin \\ kotlin-stdlib-common \\ 1.3.20 \\ 475b59a03ea03e6e3388c8f34eee6a9d08 \\ descriptor.bin加载模块元数据

  • 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 使用--info或--debug选项运行以获取更多日志输出。 与--scan一起运行以获取完整的见解。

  • https://help.gradle.org上获得更多帮助

10秒内失败

错误无法安装应用程序。 确保您已设置Android开发环境: https : //facebook.github.io/react-native/docs/getting-started.html#android-development-environment 使用--verbose标志运行CLI以获取更多详细信息。 错误:命令失败:gradlew.bat app:installDebug -PreactNativeDevServerPort = 8081

失败:构建失败,发生异常。

  • 出了什么问题:配置项目':react-native-vector-icons'时出现问题。

    无法解析配置':react-native-vector-icons:classpath'的所有依赖项。 无法从C:\\ Users \\ Pichau.gradle \\ caches \\ modules-2 \\ metadata-2.71 \\ descriptors \\ org.jetbrains.kotlin \\ kotlin-stdlib-common \\ 1.3.20 \\ 475b59a03ea03e6e3388c8f34eee6a9d08 \\ descriptor.bin加载模块元数据

  • 尝试:使用--stacktrace选项运行以获取堆栈跟踪。 使用--info或--debug选项运行以获取更多日志输出。 与--scan一起运行以获取完整的见解。

  • https://help.gradle.org上获得更多帮助

10秒内失败

at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (C:\Users\Pichau\Desktop\PetCare-RN\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\Pichau\Desktop\PetCare-RN\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\Pichau\Desktop\PetCare-RN\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Command.handleAction (C:\Users\Pichau\Desktop\PetCare-RN\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)

这是我的package.json文件{“ name”:“ petcare”,“ version”:“ 0.0.1”,“ private”:true,“ scripts”:{“ start”:“ react-native start”,“ test” :“ jest”},“ dependencies”:{“ react”:“ 16.8.6”,“ react-native”:“ 0.60.5”,“ react-native-gesture-handler”:“ ^ 1.3.0”, “ react-native-vector-icons”:“ ^ 6.6.0”,“ react-navigation”:“ ^ 3.11.1”},“ devDependencies”:{“ @ babel / core”:“ ^ 7.5.0”, “ @ babel / runtime”:“ ^ 7.5.0”,“ @ react-native-community / eslint-config”:“ ^ 0.0.3”,“ babel-jest”:“ ^ 24.1.0”,“ jest” :“ ^ 24.1.0”,“ metro-react-native-babel-preset”:“ 0.54.1”,“ react-test-renderer”:“ 16.8.6”},“ jest”:{“ preset”: “ reactive-native”}}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM