gradle下载不了包
程序员文章站
2022-03-04 09:09:26
...
Caused by: org.gradle.internal.resolve.ArtifactNotFoundException: Could not find hamcrest-core.jar (org.hamcrest:hamcrest-core:1.3). Searched in the following locations: http://xxx/repository/jcenter/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar at org.gradle.internal.resolve.result.DefaultBuildableArtifactResolveResult.notFound(DefaultBuildableArtifactResolveResult.java:27) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$LocateInCacheRepositoryAccess.resolveArtifactFromCache(CachingModuleComponentRepository.java:273) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$LocateInCacheRepositoryAccess.resolveArtifact(CachingModuleComponentRepository.java:257) at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.resolveArtifact(BaseModuleComponentRepositoryAccess.java:64)
删掉或者重命名C:\Users\xx\.gradle
重启Android Studio
A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugUnitTestApkCo py'. > Could not find junit:junit:4.12. Required by: project :app * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 7 mins 38.635 secs
gradle用3.3的,需要修改用2.3.3的插件,buildscript的classpath 用这个com.android.tools.build:gradle:2.3.3'
用了nexus的,看看是否设置了代理导致下不了内网的包
删掉gradle.properties文件的systemProp.http.proxyHost和systemProp.http.proxyPort
推荐阅读
-
Java 环境部署之Idea :解决Idea 中gradle编译 war 包编码不对
-
免费下载:简单、优雅的现代风格界面工具包_html/css_WEB-ITnose
-
Java后台实现浏览器一键导出下载zip压缩包
-
导入既有maven工程时提示jar包不能下载的处理办法
-
Spring官网下载各版本jar包的方法
-
如何从官网下载Hibernate jar包的方法示例
-
Android studio利用gradle打jar包并混淆的方法详解
-
Java使用DateUtils对日期进行数学运算经典应用示例【附DateUtils相关包文件下载】
-
百度影音下载或者观看缓冲不了的原因及解决方法
-
视频下载不了不用怕 教你怎么样轻轻松松下载任何网上视频的办法