我在android studio 1.0中工作
gradle文件显示以下错误:
执行任务“:app:compileRetroLambdaDebug”失败
apply plugin: 'android'
apply plugin: 'retrolambda'
android {
compileSdkVersion 21
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "xxxxxxxx"
minSdkVersion 10
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'io.reactivex:rxandroid:0.23.0'
}//顶级构建文件,可以添加所有子项目/模块通用的配置选项。
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0-rc1'
classpath 'me.tatarka:gradle-retrolambda:2.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}我还需要在gradle文件中做哪些更改。请给我一些建议。
发布于 2015-01-26 21:45:03
在更新eclipse中的依赖项时,我遇到了类似的错误。尝试更新到最新的插件版本,并将retrolambda更改为me.tatarka.retrolambda,因为retrolambda插件已被弃用,很快就会被移除。至少这是我修复错误所做的。
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'android'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'me.tatarka:gradle-retrolambda:2.5.0'
classpath 'com.android.tools.build:gradle:1.0.1'
}
}
...https://stackoverflow.com/questions/27293439
复制相似问题