美文网首页Android开发常见小问题列表
gradle出现编译问题Error:Could not reso

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

作者: OyeAndroid | 来源:发表于2018-08-12 11:38 被阅读11870次

    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包。

    相关文章

      网友评论

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

        本文链接:https://www.haomeiwen.com/subject/enhsbftx.html