【问题标题】: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()
}
}