首页 > 解决方案 > React Native - 运行 Android - 找不到 common.jar (android.arch.core:common:1.0.0)

问题描述

运行 react-native run-android 时,出现此错误:

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-device-info'.
      > Could not find common.jar (android.arch.core:common:1.0.0).
        Searched in the following locations:
            https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

标签: androidreact-nativegradle

解决方案


我找到了这个解决方案并为我工作:maven { url "https://maven.google.com" }在文件中添加第 18 行android/build.gradle

在此处输入图像描述


推荐阅读