Created
December 18, 2016 09:28
-
-
Save Chetan496/e96089dd4dcf5eca96f60d416ab07a62 to your computer and use it in GitHub Desktop.
Using lambda expressions in Android projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To use lambda expressions, you just have to enable the jack toolchain in build.gradle of your module. | |
Open build.gradle for you app, and configure it as follows: | |
android { | |
... | |
defaultConfig { | |
... | |
jackOptions { | |
enabled true | |
} | |
} | |
compileOptions { | |
sourceCompatibility JavaVersion.VERSION_1_8 | |
targetCompatibility JavaVersion.VERSION_1_8 | |
} | |
} | |
### Note: | |
Jack toolchain can be used if buildToolsVersion is greater than 21. | |
Also a newer version of gradle is required. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment