Problem with Gradle Android Studio

Asked

Viewed 137 times

1

I’m getting a Gradle Warning to exchange Compile for the implementation and api, but I’m no longer using Compile in my project.

Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

My Gradle app:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "br.com.teste.fcmexample"
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.google.firebase:firebase-messaging:11.8.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'
}

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

What can I do to fix this problem? I’ve given a clean and a rebuild, but no solution. My app works normal, but this Warning is.

  • Strange, this would be if instead of "implementation" you were using "Compile", but I see that in your code is right

  • Closes Android Studio, opens dnv and makes clean

  • I don’t know what else to do, I installed the new version, I updated the SDK, I created a new project, I did the procedure that @Wotonsampaio said and nothing, I’m leaving this Warning ai, rs. Damn, it’s boring to see this alert without having anything wrong.

  • Dude, if the project is new and you haven’t done anything on it, try creating another one and see if the error continues

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.