Android开发常见小问题列表

gradle出现编译问题Error:Could not reso

2018-08-12  本文已影响11870人  OyeAndroid

1.遇到如下错误:

Error:Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.

Could not determine artifacts for org.xutils:xutils:3.5.0

Could not get resource 'https://jcenter.bintray.com/org/xutils/xutils/3.5.0/xutils-3.5.0.aar'.

Could not HEAD 'https://jcenter.bintray.com/org/xutils/xutils/3.5.0/xutils-3.5.0.aar'.

Remote host closed connection during handshake

SSL peer shut down incorrectly

看着这个错误,好像是 ':app:debugRuntimeClasspath'.路径不对,导致app build.gradle下所有的.aar包都解析错误,解决办法是如下图,修改service directory path的路径,然后就编译成功了,具体为啥?

Service directory path:要注意,android studio 为什么编译也不需要导包呢?.gradle->caches->modules-2->files-2.1 里面就是一些jar包。
上一篇下一篇

猜你喜欢

热点阅读