Unable to resolve dependency for app'@debug/compileClasspath':依賴 Open File Show Details————解決方案
阿新 • • 發佈:2018-12-14
android studio 3.1.4
classpath 'com.android.tools.build:gradle:3.1.4'
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-all.zip
compileSdkVersion 27 targetSdkVersion 27 buildToolsVersion '27.0.3'
1. File - Other Setting - Default Setting
2.File - Setting
3. 如下圖
buildscript { repositories { mavenCentral() jcenter() google() maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} } dependencies { classpath 'com.android.tools.build:gradle:3.1.4' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { mavenCentral() jcenter() maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'} maven { url "https://jitpack.io" } maven { url "https://maven.google.com" } google() } }
5.選擇性參考,告辭