0

First of all, I need to make clear that I haven't much time in Android Studio and I just recently updated my Android Studio to the latest version. I realized I am using an outdated code and changed the 'compile' Configurations in my root build.gradle file to 'implementation' or 'api' but it keeps giving me warnings.

I want to connect this project to Firebase but when I clicked the button it always told me to resolve Gradle errors or resync.

[EDIT] Here's my code snippet:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.simplifiedcoding.firealert"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.google.firebase:firebase-messaging:15.0.0'
    implementation 'com.android.volley:volley:1.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

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

[EDIT] This is the output on the Build Log

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

Every time I did Gradle Sync it always give me error that mentions that 'compile' Configuration is deprecated and that I need to replace them with 'implementation/api'. The thing is, I didn't see a single 'compile' Configuration line in my code.

1 Answers1

0

change the first line in-app level gradle file..

 implementation fileTree(dir: 'libs', include: ['*.jar'])