未解决的依赖项:找不到与com.android.support:appcompat-v7:29.+匹配的任何版本
当我在intelliJ上打开一个新的android项目时,总是会出现此未解决的依赖项错误
There is always this unresolved dependency error showing up when I open a new android project on intelliJ
我尝试过:
- 取消选中离线框
- 更新gradle
- 从gradel的官方网站下载最新版本,并将gradle源设置为文件.
- 从"29. +"开始更改.到"29.0.0"
错误消息:
错误:无法解析':app @ debug/compileClasspath'的依赖项: 找不到任何匹配的版本 com.android.support:appcompat-v7:29.+.显示详细信息受影响的模块: 应用
ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+. Show Details Affected Modules: app
错误:无法解决以下项的依赖性 ':app @ debugAndroidTest/compileClasspath':找不到任何版本 匹配com.android.support:appcompat-v7:29.+.显示详细资料 受影响的模块:应用
ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+. Show Details Affected Modules: app
错误:无法解决以下项的依赖性 ':app @ debugUnitTest/compileClasspath':找不到任何版本 匹配com.android.support:appcompat-v7:29.+.显示受影响的详细信息 模组:应用程式
ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+. Show Details Affected Modules: app
错误:无法解决以下项的依赖性 ':app @ release/compileClasspath':找不到任何版本 匹配com.android.support:appcompat-v7:29.+.显示受影响的详细信息 模组:应用程式
ERROR: Unable to resolve dependency for ':app@release/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+. Show Details Affected Modules: app
错误:无法解决以下项的依赖性 ':app @ releaseUnitTest/compileClasspath':找不到任何版本 匹配com.android.support:appcompat-v7:29.+.显示详细资料 受影响的模块:应用
ERROR: Unable to resolve dependency for ':app@releaseUnitTest/compileClasspath': Could not find any version that matches com.android.support:appcompat-v7:29.+. Show Details Affected Modules: app
您应使用Android Studio.自行下载gradle并将其链接到项目不是一个好习惯.您应该让您的IDE为您处理所有工作,同时专注于用宝贵的时间编写出色的代码.你应该做的是
You should use Android Studio. Downloading gradle and linking it to a project yourself is not a good practice. You should let your IDE handle all that work for you whilst you focus on writing good code with your precious time. What you should do do is
- 从官方网站下载Android Studio
- 创建一个新项目并获得快速稳定的Internet连接
- Android Studio将在第一个版本中下载并安装gradle,您一切顺利
您甚至可以使用最佳(最高)SDK版本创建一个新项目,然后使用您自己的项目检查Gradle文件中的差异.真的可以帮上忙.
You may even make a new project with the best (highest) SDK version, and then check back with your own project the differences in the Gradle files. That can really help.