【发布时间】:2019-12-23 18:05:44
【问题描述】:
自从我安装了 react-native-vector-icons 后,我一直在尝试在我的 android 上运行该应用程序时遇到麻烦。
这是我尝试 react-native run-android 命令时显示的内容:
FAILURE:构建失败并出现异常。
-
出了什么问题: 配置项目 ':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\475b59a03ea03e6388c8f34eee6a9d08\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
FAILURE:构建失败并出现异常。
-
出了什么问题: 配置项目 ':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\475b59a03ea03e6388c8f34eee6a9d08\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)
【问题讨论】:
-
安装包后有没有运行 react-native 链接?
-
你使用的是什么版本的 react-native?你能把你的包json记录下来吗?
-
我确实使用 react-native 链接运行。
标签: android react-native react-native-android