Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not download okhttp.jar (com.squareup.okhttp3:okhttp:3.9.0)
<a href="openFile:D:/MyProjects/CXSmartCommunity/app/build.gradle">Open File</a><br><a href="Unable to resolve dependency for ':app@debug/compileClasspath': Could not download okhttp.jar (com.squareup.okhttp3:okhttp:3.9.0)">Show Details</a>
解决方案:在整个工程的build.gradle中添加以下框内框内代码:
为了大家复制方便直接贴下添加的代码:
allprojects{
repositories{
jcenter()
maven {
url"https://jitpack.io"
}
}
}
后来在app下的build.gradle android{}中添加:
aaptOptions{cruncherEnabled =false
useNewCruncher =false}
ok了