4

Hi i want to use appcompatv7-22 in my app for that i use this 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 try this v7:22.0.0 and this v7:22.1.0 too but still same error
and this is my sdk maneger enter image description here
enter image description here
so can anyone help me.

UPDATE

i see my extras\android\m2repository\com\android\support folder but 21.03 there was 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 at last thanks for dev answer my problem was support ripository library which last available version is 15 and my version was 9 and after update my problem solved.

max
  • 5,963
  • 12
  • 49
  • 80

3 Answers3

1

v7 appcompat library

This library adds support for the Action Bar user interface design pattern. This library includes support for material design user interface implementations.

Please update your version. Call this instead of yours.

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

Edit

Call latest and stable version

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

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

Community
  • 1
  • 1
IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
1
C:\Users\SysName\AppData\Local\Android\sdk\extras\android\m2repository\com\android\support

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

enter image description here

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

bCliks
  • 2,918
  • 7
  • 29
  • 52
0

Issue Description:

Build - Build Output tab

Could not find com.android.support:appcompat-v7:22.0.0.
Required by:
project :app
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 Project Structure dialog
Affected Modules: app

Note:

Android Support Repository is up to date (Version 47.0.0, July 2019)


SOLUTION: Include Google's Maven repository in your project's build.gradle file.

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

allprojects {
    repositories {
        google()
    }
}


Source: Adding Support Library

icernos
  • 395
  • 3
  • 6