【问题标题】:Could not find support-compat.aar (com.android.support:support-compat:26.1.0)找不到 support-compat.aar (com.android.support:support-compat:26.1.0)
【发布时间】:2018-11-10 11:52:16
【问题描述】:

我正在尝试使用 spinkit react native 库及其在 ios 上的工作,但是当我在 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-spinkit'.
      > Could not find support-compat.aar (com.android.support:support-compat:26.1.0).
        Searched in the following locations:
            https://jcenter.bintray.com/com/android/support/support-compat/26.1.0/support-compat-26.1.0.aar

有什么想法吗?

【问题讨论】:

  • 您好,有人可以帮忙吗?

标签: android reactjs react-native android-gradle-plugin


【解决方案1】:

只需转到 URL,您就可以看到那里没有找到任何东西。

确保你的 gradle 文件中有这样的部分

repositories {
    google()
    jcenter()
}

【讨论】:

    【解决方案2】:

    删除所有 gradle 缓存文件(~/.gradle/),再试一次!

    【讨论】:

      【解决方案3】:

      请通过以下方式更新构建项目的顺序 $ cordova build android

      Open {project-root-folder}/platforms/android/build.gradle
      

      现有代码:

      buildscript {
          repositories {
              jcenter()
              maven {
                  url "https://maven.google.com"
              }
          }
      }
      
      allprojects {
          repositories {
              jcenter()
              maven {
                  url "https://maven.google.com"
              }
          }
      }
      

      代码更新如下:

      buildscript {
          repositories {
              maven {
                  url "https://maven.google.com"
              }
              jcenter()
          }
      }
      
      allprojects {
          repositories {
              maven {
                  url "https://maven.google.com"
              }
              jcenter()
          }
      }
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-03-28
        • 2019-04-07
        • 1970-01-01
        • 1970-01-01
        • 2020-03-08
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多