1.如果在Android Studio中运行项目,下载依赖包,出现报错内容如下
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find me.jessyan:autosize:1.2.1.
2.如果构建项目时拉取不到gradle资源,可以将地址修改成阿里云的国内镜像。解决方式如下:文章来源:https://www.toymoban.com/news/detail-764631.html
问题解决
打开build.gradle文件,加入代码
maven{ url 'https://maven.aliyun.com/repository/google'}
maven{ url 'https://maven.aliyun.com/repository/jcenter'}如下所示:
repositories {
//加入代码
maven{ url 'https://maven.aliyun.com/repository/google'}
maven{ url 'https://maven.aliyun.com/repository/jcenter'}
}
allprojects {
repositories {
//加入代码
maven{ url 'https://maven.aliyun.com/repository/google'}
maven{ url 'https://maven.aliyun.com/repository/jcenter'}
}
}
重新在sync Now就可以成功文章来源地址https://www.toymoban.com/news/detail-764631.html
到了这里,关于Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find me.jessyan:aut的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!