android - 如何解决 'com.android.support:appcompat-v7:28.0.0'

标签 android android-studio error-handling build

该应用程序已经具有 implementation 'com.android.support:appcompat-v7:26.0.0' .so为了保持更新,我将其更改为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'

btw ..您可以`忽略顶部的compileSdkVersion。它曾经是实现SdkVersion,导致了很多其他错误。然后我将其更改为compileSdkVersion。

最佳答案

就我而言,我只是在项目级别gradle中更新Google服务。

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

关于android - 如何解决 'com.android.support:appcompat-v7:28.0.0',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59919275/

相关文章:

java - Android 加密 RSA InvalidKeyException

java - 当我在其他 Activity 中使用 mqtt 客户端时,他们向我显示错误

java - 尝试从 Edmtdev 克隆 Android Uber 应用程序,java.lang.RuntimeException : Unable to start activity ComponentInfo, android.view.InflateException

java - 创建后台(前台?)服务来计算时间并在整个应用程序生命周期中更新 ui(如 endemondo 中)

ruby-on-rails - 比我目前正在做的更好的错误处理?

vba - 嵌套循环和If,不执行循环

android popupwindow float 在父 View 之外

android - TextView 可以选择并包含链接吗?

java - 一种布局中图像的最大尺寸是多少?

c# - .net 的错误报告框架