无法解决:com.android.support:appcompat-v7:30.0.0 [英] Failed to resolve: com.android.support:appcompat-v7:30.0.0

查看:230
本文介绍了无法解决:com.android.support:appcompat-v7:30.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am beginner and getting this error in Android Studio :-

错误:(26,13)无法解决:com.android.support:appcompat-v7:30.0.0安装存储库并同步项目
在文件中显示
在项目结构中显示对话框

Error:(26, 13) Failed to resolve: com.android.support:appcompat-v7:30.0.0 Install Repository and sync project
Show in File
Show in Project Structure dialog

这是我的gradle代码:-

And here is my gradle code :-

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'
}

我正在使用Android Studio 2.2.1版本进行学习.任何帮助将不胜感激.

I am using Android Studio 2.2.1 version for learning purpose. Any help will really be appreciated.

推荐答案

发生这种情况是因为支持库 v.30 存在.

It happens because the support libraries v.30 don't exist.

使用 androidx 库:

implementation 'androidx.appcompat:appcompat:1.1.0'

或使用最后一个支持库:

or use the last support library:

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

这篇关于无法解决:com.android.support:appcompat-v7:30.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆