I need to enable Java8 support in my project. All the answers that I find are outdated and I can't figure out what actually has to be done. So far I have done this :
1. Added compileOptions
:
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
This gives me the error below :
ERROR: Jack is required to support java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.
ERROR: Jack is required to support Java 8 language features. Either enable Jack or remove sourceCompatibility JavaVersion.VERSION_1_8.
- I tried to enable jack using
jackOptions
. But the gradle could not identifyjackOptions
. I read somewhere that jack is deprecated. I have not idea where to go from here.
gradle version : 4.10.3