Всегда появляется эта неразрешенная ошибка зависимости, когда я открываю новый проект Android на intelliJ
Я пытался:
Сообщение об ошибке:
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
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
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
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
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 выполнять всю эту работу за вас, в то время как вы сосредоточитесь на написании хорошего кода в свое драгоценное время. Что вы должны сделать, это
Вы даже можете создать новый проект с лучшей (самой высокой) версией SDK, а затем проверить в своем собственном проекте различия в файлах Gradle. Это действительно может помочь.
Это происходит потому, что com.android.support:appcompat-v7:29.x.x
не существует.
Вы можете проверить лист регистраций изменений и репозиторий гугл мавен:
27.0.2
27.1.0
27.1.1
28.0.0-alpha1
28.0.0-alpha3
28.0.0-beta01
28.0.0-rc01
28.0.0-rc02
28.0.0
Также проверьте это важное примечание:
Note: With the release of Android 9.0 (API level 28) there is a new version of the support library called AndroidX which is part of Jetpack. The AndroidX library contains the existing support library and also includes the latest Jetpack components.
You can continue to use the support library. Historical artifacts (those versioned 27 and earlier, and packaged as android.support.*) will remain available on Google Maven. However, all new library development will occur in the AndroidX library.
We recommend using the AndroidX libraries in all new projects. You should also consider migrating existing projects to AndroidX as well.