摇篮同步失败

时间:2018-09-21 10:55:29

标签: java android

如何修复 我使用Android Studio 我试图卸载并重新安装sdk,但没有用

显示错误找不到com.android.support.constraint:constraint-layout:1.1.3。 在以下位置搜索:

file:/C:/Users/rza/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.pom
file:/C:/Users/rza/AppData/Local/Android/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.jar
file:/C:/Users/rza/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.pom
file:/C:/Users/rza/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.jar
file:/C:/Users/rza/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.pom
file:/C:/Users/rza/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.jar
https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.pom
https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.jar

要求:     项目:app

如何更改Gradle的路径?

2 个答案:

答案 0 :(得分:0)

约束布局1.1.3不在jcenter上托管。检查您的build.gradle中是否有 Maven中心

repositories {
    ...
    mavenCentral()
    ...
}

答案 1 :(得分:0)

在build.gradle(Module:app)中转到依赖项,您将找到此行

implementation 'com.android.support.constraint:constraint-layout:1.1.3'

尝试将其更改为

implementation 'com.android.support.constraint:constraint-layout:1.1.0'

您可能尚未安装最新的1.1.3版本