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

后端 未结 9 1628
猫巷女王i
猫巷女王i 2020-12-05 22:48

When I use com.android.support:appcompat-v7:28.+ in my project\'s build.gradle(module) it works without any error. But when I just use com.an

相关标签:
9条回答
  • 2020-12-05 23:02

    some guys who still might have the problem like me (FOR IRANIAN and all the coutries who have sanctions) , this is error can be fixed with proxy i used this free proxy for android studio 3.2 https://github.com/freedomofdevelopers/fod just to to Settings (Ctrl + Alt + S) and search HTTP proxy then check Manual proxy configuration then add fodev.org for host name and 8118 for Port number

    0 讨论(0)
  • 2020-12-05 23:03

    in build.gradle , the version of bellow line should be same

    implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
    implementation 'com.android.support:design:28.0.0'
    
    0 讨论(0)
  • 2020-12-05 23:04

    Add the following code on build.gragle (project) for adding Google maven repository

    allprojects {
        repositories {
        ...
            maven {
                url 'https://maven.google.com/'
                name 'Google'
            }
        ...
        }
    }
    
    0 讨论(0)
  • 2020-12-05 23:08

    Ensure that your buildToolsVersion version tallies with your app compact version.

    In order to find both installed compileSdkVersion and buildToolsVersion go to Tools > SDK Manager. This will pull up a window that will allow you to manage your compileSdkVersion and your buildToolsVersion.

    To see the exact version breakdowns ensure you have the Show Package Details checkbox checked.

    android {
        compileSdkVersion 28
        buildToolsVersion "28.0.3" (HERE)
        defaultConfig {
            applicationId "com.example.truecitizenquiz"
            minSdkVersion 14
            targetSdkVersion 28
            versionCode 1
            versionName "1.0"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        }
        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:appcompat-v7:28.0.0' (HERE)
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        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'
    }
    
    0 讨论(0)
  • 2020-12-05 23:10

    my problem was just network connection. using VPN solved the issue.

    0 讨论(0)
  • 2020-12-05 23:18

    28.0.0 is the final version of support libraries. Android has migrated to AndroidX. To use the latest android libraries, Migrating to AndroidX


    Edit: Versions 28.0.0-rc02 and 28.0.0 are now available.

    I don't see any 28.0 version on Google Maven. Only 28.0.0-alpha1 and 28.0.0-alpha3. Just change it to either of those or how it was previously, i.e., with .+ which just means any version under 28 major release.

    For an alpha appcompat release 28.+ makes more sense.

    0 讨论(0)
提交回复
热议问题