Saya memiliki satu Peringatan yang sama dengan com.google.gms: google-services.
Solusinya adalah meng - upgrade classpath com.google.gms: google-services ke classpath 'com.google.gms: google-services: 3.2.0' dalam file di build.gradle Project:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.2.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Di Android Studio verion 3.1 dependensi kata pelengkap diganti menjadi implementasi
dependensi dengan Peringatan di android studio 3.1
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:27.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
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'
}
dependensi OK di android studio 3.1
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
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'
}
Gradel menghasilkan oleh Android Studio 3.1 untuk proyek baru.
Kunjungi https://docs.gradle.org/current/userguide/dependency_management_for_java_projects.html
Untuk perincian https://docs.gradle.org/current/userguide/declaring_dependencies.html