gpt4 book ai didi

java - 收到警告 : Configuration 'compile' is obsolete and has been replaced with 'implementation'

转载 作者:行者123 更新时间:2023-12-02 02:28:07 25 4
gpt4 key购买 nike

我已在项目的 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 年底被删除。有关更多信息,请参阅:Still getting warning : Configuration 'compile' is obsolete and has been replaced with 'implementation'受影响的模块:应用程序

最佳答案

警告是由 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'

关于java - 收到警告 : Configuration 'compile' is obsolete and has been replaced with 'implementation' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57243434/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com