簡體   English   中英

如何解決“com.android.support:appcompat-v7:28.0.0”

[英]How to resolve 'com.android.support:appcompat-v7:28.0.0'

該應用程序已經implementation 'com.android.support:appcompat-v7:26.0.0'為了保持更新,我將其更改為 28.0.0。 我仍然得到配置 'compile' 已過時並已被 'implementation' 和 'api' 取代 錯誤。

我怎樣才能永久解決這個錯誤。 我嘗試了許多針對類似問題提供的不同解決方案,但沒有奏效。

下面更新了build.gradle

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "man.ravi.app"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 2
        versionName "1.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            multiDexEnabled true
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:design:26.1.0'
    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'
    implementation 'com.adefruandta.spinningwheel:spinningwheel:0.1.0'
    implementation 'com.google.firebase:firebase-core:10.0.1'
    implementation 'com.google.firebase:firebase-database:10.0.1'
    implementation 'org.immutables:gson:2.6.1'
    implementation 'com.google.android.gms:play-services:10.0.1'
    implementation 'com.google.android.gms:play-services-maps:10.0.1'
    implementation 'com.google.android.gms:play-services-ads:10.0.1'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'gun0912.ted:tedpermission:2.1.0'

}
apply plugin: 'com.google.gms.google-services'

順便說一句..你可以忽略頂部的compileSdkVersion。 它曾經是 implementationSdkVersion 導致一堆其他錯誤..然后我將其更改為 compileSdkVersion。

就我而言,我只是在項目級別的 gradle 中更新 Google 服務。

      classpath 'com.google.gms:google-services:3.2.0' 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM