Add appcompat v7-22 to your android studio project

Hi, I want to use appcompatv7-22 in my application to use these gradle settings

android { compileSdkVersion 22 buildToolsVersion "22.0.0" defaultConfig { applicationId "com.myapp" minSdkVersion 11 targetSdkVersion 22 } buildTypes { release { minifyEnabled true proguardFiles 'proguard.cfg' } } } dependencies { compile 'com.android.support:appcompat-v7:22.+' } 

but when I run it, I give this error message

 Error:Failed to find: com.android.support:appcompat-v7:22.+ 

I am trying to use this v7: 22.0.0 and this v7: 22.1.0 too, but still the same error
and this is my sdk maneger enter image description here
enter image description here
so can someone help me.

UPDATE

I see the extras \ android \ m2repository \ com \ android \ support folder, but March 21 was the latest version. my repository version is 10, and I know its latest version, so where is com.android.support:appcompat-v7:22.0.0 ?
answer
I found my problem, finally, thanks that dev replied that my problem is with the support of the ripository library, the latest version of which is 15, and my version is 9, and after updating my problem is solved.

+4
source share
4 answers

There is no Android support repository , so go to the Android SDK, install the Android support repository and Android Support Library . You can also use the following

Avoid writing +, instead write option no.

 compile 'com.android.support:appcompat-v7:22.2.0' 
+14
source

v7 appcompat library

This library adds support for the user interface design of the Action Bar template. This library includes user support for interface materials.

Please update your version . Call it instead of yours.

 compile 'com.android.support:appcompat-v7:22.2.0' 

Edit

Call the latest and stable version

  compile 'com.android.support:appcompat-v7:23.4.0' 

And set minifyEnabled false . Then Re-Build & Gradle & Restart your project

+1
source
 C:\Users\SysName\AppData\Local\Android\sdk\extras\android\m2repository\com\android\support 

In windows check this path. In the support folder, you can get appcompat lib or any lib support you want. In the appcompat folder you can get a list of versions installed using sdk.

enter image description here

Get the version number and just specify the same version number in the gradle settings as shown below. compile 'com.android.support:appcompat-v7:25.0.0'

+1
source

Description of the problem :

Assembly - Output Assembly Tab

Could not find com.android.support:appcompat-v7:22.0.0.
It is required:
project: application
Please install the Android support repository from the Android SDK Manager. Open Android SDK Manager

Build - Sync Tab

ERROR: Failed to resolve: com.android.support:appcompat-v7:22.0.0
Add Google Maven Repository and Sync Project
Show in the Project Structure dialog box
Affected Modules: Application

Note :

Android support repository improved (version 47.0.0, July 2019)


SOLUTION: Include the Google Maven repository in the build.gradle project file.

  • Open build.gradle
  • Add "google ()" as shown below

all projects {
repositories {
Google ()
}
}


Source: Adding a Support Library

0
source

All Articles