Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/220.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 梯度同步失败_Java_Android - Fatal编程技术网

Java 梯度同步失败

Java 梯度同步失败,java,android,Java,Android,如何修复它 我使用安卓工作室 我试图卸载并重新安装sdk,但没有成功 显示错误无法找到com.android.support.constraint:constraint布局: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

如何修复它 我使用安卓工作室 我试图卸载并重新安装sdk,但没有成功

显示错误无法找到
com.android.support.constraint:constraint布局: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
要求: 项目:应用程序


如何更改Gradle的路径?

约束布局1.1.3未托管在jcenter上。检查您的
build.gradle中是否有maven central

repositories {
    ...
    mavenCentral()
    ...
}
在build.gradle(模块:app)中,转到dependencies,您会发现这一行

implementation 'com.android.support.constraint:constraint-layout:1.1.3'
试着把它改成

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

您可能还没有安装最新的1.1.3版本

我只是想在java文件夹中添加更多活动,但不起作用:如何签入build.gradle,在我的菜单中,它没有显示任何类似Mavenentral的内容,只需双击并将其编辑为任何文本文件,此处不涉及菜单。抱歉!我刚刚添加了mavenCentral(),但它再次显示在see消息中找不到它:找不到com.android.support.constraint:constraint layout:1.1.3。在以下位置搜索:文件:/C:/Users/rza/AppData/Local/Android/Sdk/extras/m2repository/com/Android/support/constraint/constraint-layout/1.1.3/constraint-layout-1.1.3.pom,但它现在正在maven central上搜索吗?搜索显示:Elementtyp“application”不能与应用程序一起关闭,但没有应用程序打开!好的,但是最好安装它而不是降级。是的,我只是想找出问题的根源。如果它是由较旧版本的gradle生成的,那么显然要做的就是更新它。我将3改为0,它是..:dependencies{CompileFileTree(dir:'libs',include:['*.jar'])compile'com.android.support.constraint:constraint layout:1.1.3'testCompile'junit:junit:4.12'compile'com.android.support:appcompile'com.android.support:support-v4:23.3.0'compile'com.android.support:design:23.3.0'}将约束更改为1.1.0后是否同步渐变,如果是这样,那么它给了你什么错误?