Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unresolved dependency :Could not find any version that matches com.android.support:appcompat-v7:29.+ [duplicate]

There is always this unresolved dependency error showing up when I open a new android project on intelliJ

I have tried:

  1. unchecking the offline box
  2. updating gradle
  3. downloading the latest version from gradel's official website and setting gradle source to the file.
  4. changing from "29.+." to "29.0.0"

Error message:

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

like image 462
Justin_Time Avatar asked Nov 07 '22 16:11

Justin_Time


1 Answers

It happens because com.android.support:appcompat-v7:29.x.x doesn't exist.

You can check the revision history and the google maven repo:

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

Also check this important note:

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.

like image 188
Gabriele Mariotti Avatar answered Nov 14 '22 23:11

Gabriele Mariotti