Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add appcompat v7-22 to Android studio project

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.

like image 295
max Avatar asked Dec 02 '22 16:12

max


2 Answers

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

like image 52
IntelliJ Amiya Avatar answered Dec 05 '22 04:12

IntelliJ Amiya


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'

like image 21
bCliks Avatar answered Dec 05 '22 04:12

bCliks