在我的项目的build.gradle中,我已经用实现代替了编译的发生,但是我仍然收到此警告。
我的build.gradle:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://dl.bintray.com/android/android-tools' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.henesiz"
minSdkVersion 21
targetSdkVersion 28
versionCode 22
versionName "1.11"
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
signingConfigs {
release {
keyAlias 'imon'
keyPassword '123456'
storeFile file('key.jks')
storePassword '123456'
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug{
signingConfig signingConfigs.release
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.firebase:firebase-core:10.2.1'
implementation 'com.google.firebase:firebase-messaging:10.2.1'
implementation group: 'com.appsflyer', name: 'af-android-sdk', version:'4.3.7'
implementation 'com.mixpanel.android:mixpanel-android:4.6.4'
implementation 'com.google.android.gms:play-services-location:10.2.1'
implementation 'com.octo.android.robospice:robospice-retrofit:1.4.14'
}
apply plugin: 'com.google.gms.google-services'
警告:配置'compile'已过时,并已由'implementation'和'api'代替。 它将于2018年底删除。有关更多信息,请参阅:http://d.android.com/r/tools/update-dependency-configurations.html 受影响的模块:应用
答案 0 :(得分:0)
google-services:3.0.0
将引发警告,您可以通过升级到com.google.gms:google-services:3.2.0
或更高版本来消除错误。
classpath 'com.google.gms:google-services:3.2.0'
P.S-除非有特殊原因,否则选择最新的稳定版本通常是个好主意。
classpath 'com.google.gms:google-services:4.3.0'