Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Failed to resolve: com.android.support:appcompat-v7:28.1.1

Tags:

android

Error : Sync failed. Unresolved Android dependencies. Failed to resolve: com.android.support:appcompat-v7:28.1.1

Config:

 apply plugin: 'com.android.application'

    android {
        compileSdkVersion 28
        defaultConfig {
            applicationId "com.ercess.ercess_app1"
            minSdkVersion 15
            targetSdkVersion 28
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }



    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support.constraint:constraint-layout:1.1.2'
        implementation 'com.android.support:appcompat-v7:28.1.1'
        implementation 'com.squareup.picasso:picasso:2.71828'
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
        androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    }

How to resolve this?

like image 821
Debbie Avatar asked Aug 22 '18 07:08

Debbie


2 Answers

Replace

implementation 'com.android.support:appcompat-v7:28.1.1

with

implementation 'com.android.support:appcompat-v7:28.0.0-rc01'

Currently, the most recent available release for appCompat is 28.0.0-rc01, you are trying to pull an unavailable version of appcompat library.

like image 101
Qasim Avatar answered Nov 15 '22 07:11

Qasim


Root cause: The version 28.1.1 is not exist.

Solution: Use the latest stable version

implementation 'com.android.support:appcompat-v7:27.1.1'

or use latest unstable version

implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
like image 40
Son Truong Avatar answered Nov 15 '22 08:11

Son Truong