Android studio 关联导入使用Lambda

1,Android studio 关联Lambda 

【1】Github地址:https://github.com/evant/gradle-retrolambda

 

【2】导入步骤

  • 在项目的build.gradle 文件中添加仓库,添加路径

 

buildscript {

    repositories {

        jcenter()

        mavenCentral()

    }

    dependencies {

        classpath 'com.android.tools.build:gradle:2.2.2'

        classpath 'me.tatarka:gradle-retrolambda:3.3.1'

        // NOTE: Do not place your application dependencies here; they belong

        // in the individual module build.gradle files

    }

}

 

 

allprojects {

    repositories {

        jcenter()

        mavenCentral()

    }

}

 

  • 在app/build.gradle 中配置

apply plugin: 'me.tatarka.retrolambda'

 

android {

    compileSdkVersion 25

    buildToolsVersion "25.0.0"

    defaultConfig {

    }

    buildTypes {

    }

    compileOptions {

    sourceCompatibility JavaVersion.VERSION_1_8

    targetCompatibility JavaVersion.VERSION_1_8

    }

}

dependencies {

}

你可能感兴趣的:(Android studio 关联导入使用Lambda)