现象:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform okio-1.17.2.jar (com.squareup.okio:okio:1.17.2) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not download okio-1.17.2.jar (com.squareup.okio:okio:1.17.2)
> Could not get resource 'https://jcenter.bintray.com/com/squareup/okio/okio/1.17.2/okio-1.17.2.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/squareup/okio/okio/1.17.2/okio-1.17.2.jar'.
> peer not authenticated
分析
这是java和charlse的一个冲突,如果电脑之前有运行过 charlse抓包工具,那么java编译就容易倒霉催的被代理,然后就更新不了一些java包
解决方法:
1,重启电脑
2,退出charlse,打开任务管理器,杀掉所有java进程,再试试应该就可以
3,有设置java不走代理的方法,但我没试成功
网友评论