There has been a lot of people asking for a Java/OpenJDK update in the Android Convenience Image for awhile now. AdoptOpenJDK has a great blog post explaining why they’re moving to Java v11 as their default as well. You can find that here. Last month I posted a GitHub Issue discussing this change for August 2020, maybe sooner in July. Considering we’re already in July, we’re going to stick with an August date for this change, updating the image August 17th.
Testing this change
While not available today, we’ll have images you can use to test Android and OpenJDK v11 very soon. This will be our staging images though so my suggestion is to simply use them to test your CI builds for Java v11 support, not as production images to stay on forever.
Stay tuned to this post (there’s a dropdown to “watch” this topic below) or the GitHub Issue to see when these staging images are available.
Avoiding this Change
We will not be running multiple versions of the Android image so you can’t really avoid it long term. Java 8 support for many tools is actively being dropped so this change is going to be needed for many Android ecosystem tools. If by August 17th you are still not ready for this change, you could pin the specific Android image you are using, thus preventing the version of Java from being changed out from under you. Keep in mind, that freezes your image meaning there’ll be no updates at all to it. You can learn more about pinning an image here.
Questions? Please respond below.