Reputation: 483
I tried to enable Java 8 in Android 3.0 Canary 2, but I get the error that Jack is needed for Java 8. But this annoucement https://developer.android.com/guide/platform/j8-jack.html says that jack is no longer needed for 3.0 preview version. What am i doing wrong.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
Upvotes: 3
Views: 434
Reputation: 483
Fixed the problem. I had tried to enable java 8 on an existing project created in Android 2.4. So the gradle version was 3.x . Uprading gradle to 4.x fixed the problem
Upvotes: 6