Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

enter image description hereMy Android Studio is full of error android studio cannot identify libraries.

Error:(27, 13) Failed to resolve: com.android.support:appcompat-v7:25.1.0 
like image 644
Richa Singh Avatar asked Feb 18 '17 09:02

Richa Singh


People also ask

What is Appcompat in Android?

When new versions of android are published, Google will have to support the older versions of android. So AppCompat is a set of support libraries which can be used to make the apps developed with newer versions work with older versions.

How do I add the v7 Appcompat support library to my project?

In the Properties window, select the "Android" properties group at left and locate the Library properties at right. Select /path/to/appcompat/ and Click Remove. Click Add to open the Project Selection dialog. From the list of available library projects, select v7 appcompat library and click OK.

Which v7 support libraries are used for modifying UI settings?

v7 Preference Support Library The preference package provides APIs to support adding preference objects, such as CheckBoxPreference and ListPreference , for users to modify UI settings. The v7 Preference library adds support for interfaces, such as Preference.

What is AndroidX library?

The Android Extension Library, often known as AndroidX, is the new open-source project that is a significant upgrade to the original Android Support Library and can be used to develop, test, package version, and release libraries within Jetpack. The Android Jetpack libraries are part of the AndroidX namespace.


1 Answers

Make sure that the repositories section includes a maven section with the "https://maven.google.com" endpoint. For example:

allprojects {     repositories {         jcenter()         maven {             url "https://maven.google.com"         }     } } 

Update:

allprojects {     repositories {         google()          // If you're using a version of Gradle lower than 4.1, you must         // instead use:         //         // maven {         //     url 'https://maven.google.com'         // }     } } 

See android documention for details

like image 54
Tomero Indonesia Avatar answered Sep 28 '22 10:09

Tomero Indonesia