即使版本相同,所有com.android.support库也必须使用完全相同的版本规范

时间:2018-07-22 06:06:31

标签: gradle android-gradle android-appcompat

这是我所有的毕业代码

apply plugin: 'com.android.application'
android {
    compileSdkVersion 28
    buildToolsVersion '28.0.1'

    defaultConfig {
        applicationId "com.example.remindme"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:28.+'
    compile 'com.android.support:recyclerview-v7:28.+'
    compile 'com.getbase:floatingactionbutton:1.9.0'
    compile 'com.wdullaer:materialdatetimepicker:1.2.1'
    compile 'com.bignerdranch.android:recyclerview-multiselect:+'
    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
}

但是它仍然在这行给我错误

compile 'com.android.support:appcompat-v7:28.+'

我不知道现在出了什么问题,任何提示如何立即解决问题

1 个答案:

答案 0 :(得分:0)

您使用的是28版的SDK,请从28版开始构建SDK版本。

步骤:

  1. 关闭当前项目。
  2. 单击"Looking for updates"
  3. 开始更新。

更新完成后,转到设置并使Gradle脱机,并记住应该也更新了Gradle。

谢谢,希望对您有所帮助。

相关问题