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

14,045

Solution 1

I opened my android_sdk then updated my Android Support Repository, Android Support Library and Google Repository, so the problem in my Intellij is resolved.

Solution 2

I meet the similar error too.But my problem is failed to resolve com.android.support:appcompat-v7:23.2.1. I update the Local Maven repository for Support Libraries and Android Support Library in Extra to the newest version.Finally,my problem is over.

Share:
14,045
wangming
Author by

wangming

Updated on June 18, 2022

Comments

  • wangming
    wangming almost 2 years

    when I import an eclipse project to the AS,an error occurred:

    E:\studioWorkspace\YTHDBL\yTHDBL\build.gradle
    Error:Error:line (25)Failed to resolve: com.android.support:appcompat-v7:22.2.1
    Install Repository and sync project
    Show in File
    open.dependency.in.project.structure
    Show in Project Structure dialog</a>
    Error:Error:line (24)Failed to resolve: com.android.support:support-v4:22.2.1   
    Install Repository and sync project
    Show in File
    open.dependency.in.project.structure
    Show in Project Structure dialog
    

    I searched for answers and found this:how do I properly install support_v7

    Did I set the wrong support library number?,I tried 22.0.0,22.2.0.....,but not worked.

    In my sdk manager ,the Android support Repository was installed,reversion 16,and the Android Support Library was already installed,reversion 22.2.1. The google Repository was installed too.

    and this is my build.gradle:

     dependencies {
        compile project(':library')
        compile project(':alipay_lib')
        compile project(':sMSSDK')
        compile 'com.android.support:support-v4:22.2.1'
        compile 'com.android.support:appcompat-v7:22.2.1'
        compile files('libs/alipay.jar')
        compile files('libs/android-query.0.25.10.jar')
        compile files('libs/baidumapapi_v3_1_0.jar')
        compile files('libs/commons-codec-1.6.jar')
        compile files('libs/jackson-core-asl-1.9.11.jar')
        compile files('libs/jackson-mapper-asl-1.9.11.jar')
        compile files('libs/jpush-sdk-release1.7.5.jar')
        compile files('libs/locSDK_4.2.jar')
        compile files('libs/umeng-analytics-v5.5.3.jar')
        compile files('libs/zxing.jar')
    }
    

    where are the problems? and now I can't find the "try again" button in AS,how can I try again?