小编Piy*_*agi的帖子

无法解析:com.android.support:appcompat-v7:30.0.0

我是初学者,在 Android Studio 中遇到此错误:-

错误:(26, 13) 无法解决:com.android.support:appcompat-v7:30.0.0 Install Repository and sync project
Show in File
Show in Project Structure dialog

这是我的 gradle 代码:-

apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.0"
    defaultConfig {
        applicationId "com.example.piyushbairagi.demoapp"
        minSdkVersion 15
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:30.0.0'
    testCompile 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)

我使用 …

android android-appcompat android-support-library android-studio androidx

3
推荐指数
2
解决办法
1万
查看次数