【发布时间】:2020-01-20 07:43:40
【问题描述】:
我将我的 Android Studio 从 3.0.1 更新到 3.1.0
但更新后,当我构建我的项目时,它显示 2 警告:
1.用实现替换编译(编译支持将在 2018 年底结束)
2。将 testCompile 替换为 testImplementaion(并且 testCompile 支持将于 2018 年底结束)
所以,最后做这些改变,但之后,它显示一些错误:
build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "biz.coolpage.aashish.app"
minSdkVersion 17
targetSdkVersion 27
versionCode 4
versionName "1.2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:design:27.1.0'
implementation project(':library')
}
build.gradle(Project:Abc)
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
}
}
allprojects {
repositories {
jcenter()
google()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
【问题讨论】:
-
你能显示你的 build.gradle 中有什么
-
@Pulkit 用 build.gradle 更新了我的问题
-
你能不能也展示一下你之前的 gradle 文件是什么?
-
@WoogieNoogie 在此之前,在依赖部分而不是
implementationcompile写的就是这样。 -
能否添加第二个 build.gradle 也只是想确定一件事
标签: android android-studio updates javacompiler