Reputation: 3497
I'm trying to play with Java11 APIs in android application and failed to make it compile.
Steps to fail:
app/build.gradle
and set sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
FirstFragment.java:3: error: package android.os does not exist
So the question is - what am I doing wrong? What is missing to build the project with sourceCompatibility JavaVersion.VERSION_11
?
Upvotes: 5
Views: 8136
Reputation: 3778
Just switch to the latest version Android Studio Arctic Fox Canary 9 (2020.3.1.9) and AGP 7.0
Upvotes: 2