更新后buildToolsVersion 25.0.3 to 28.0.3
,build:gradle:2.3.3 to 3.4.0
我遇到了这些问题;如何解决这些问题 谢谢
- 错误:android-apt插件与 Android Gradle 插件不兼容
- 警告:您使用的插件之一支持 Java 8 语言功能。要尝试内置在 Android 插件中的支持,请从 build.gradle 中删除以下内容: apply plugin: 'me.tatarka.retrolambda'
- 警告:API
'variantOutput.getProcessResources()'
已过时并已替换为'variantOutput.getProcessResourcesProvider()'
. 它将在 2019 年底被删除。
这是我的代码Bulid.gradle(模块:App)
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.admin.schoolapp"
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName android.defaultConfig.applicationId
}
}
dependencies {
//noinspection GradleDependency
annotationProcessor 'org.androidannotations:androidannotations:4.6.0'
//noinspection GradleDependency
implementation 'org.androidannotations:androidannotations-api:4.6.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.squareup:otto:1.3.8'
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
implementation 'org.apache.commons:commons-lang3:3.9'
implementation 'commons-io:commons-io:2.4'
implementation 'com.koushikdutta.ion:ion:2.2.1'
implementation 'com.google.code.gson:gson:2.8.5'
}
Bulid.gradle(项目:TestProject)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'me.tatarka:gradle-retrolambda:3.7.1'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
repositories {
mavenLocal()
mavenCentral()
}
task clean(type: Delete) {
delete rootProject.buildDir
}