在今天因为要适配android 8.0的桌面图标,所以升级了android studio到3.0,升级后就遇到了很多问题,要你升级开发gradle等等,这都还好,突然报了Failed to resolve这个错误,真的要命,就是下载不了第三方的组件,然后一直找找找,最后在build.gardle里面添加了
repositories {
maven {
url "http://repo1.maven.org/maven2"
}
}后面就可以了,真的不容易
//下面得全部得代码,这个是主gradle得,其他再moudle.gradle中注释了compile 'com.android.support:design:26.+'
buildscript { repositories { jcenter() maven { url "http://repo1.maven.org/maven2" } } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() maven { url "http://repo1.maven.org/maven2" } } } task clean(type: Delete) { delete rootProject.buildDir }