引入
eclipse http://www.eclipse.org/downloads/packages/eclipse-standard-432/keplersr2
Help -> EclipseMarketplace -> 搜索Java 8 Kepler ->Java 8 support for eclipse Kepler SR2 安装完成后需要重启
Android Studio
在project的build.gradle文件中添加
buildscript {
dependencies {
classpath ‘me.tatarka:gradle-retrolambda:3.2.5‘
}
}
在app的build.gradle文件中添加
apply plugin: ‘me.tatarka.retrolambda‘
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
使用
时间: 2024-10-17 03:54:21