Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to resolve: com.android.support:appcompat-v7:28.0

Tags:

android

gradle

When I use com.android.support:appcompat-v7:28.+ in my project's build.gradle(module) it works without any error. But when I just use com.android.support:appcompat-v7:28, just without .+, it gives me an error:

Failed to resolve: com.android.support:appcompat-v7:28.0

Just without the .+ end of it. I added maven before but the result was the same. Any idea to solve it?

like image 460
رضا پریور Avatar asked Jul 20 '18 21:07

رضا پریور


2 Answers

28.0.0 is the final version of support libraries. Android has migrated to AndroidX. To use the latest android libraries, Migrating to AndroidX


Edit: Versions 28.0.0-rc02 and 28.0.0 are now available.

I don't see any 28.0 version on Google Maven. Only 28.0.0-alpha1 and 28.0.0-alpha3. Just change it to either of those or how it was previously, i.e., with .+ which just means any version under 28 major release.

For an alpha appcompat release 28.+ makes more sense.

like image 78
Sourabh Avatar answered Oct 13 '22 23:10

Sourabh


Add the following code on build.gragle (project) for adding Google maven repository

allprojects {     repositories {     ...         maven {             url 'https://maven.google.com/'             name 'Google'         }     ...     } } 
like image 28
Vinil Chandran Avatar answered Oct 13 '22 23:10

Vinil Chandran