Java version error
atipijasin opened this issue · comments
Hello,
we are using this image to run tests on our CI, we are using Robolectric 4.4 in our tests. Since we upgraded to Android SDK 29 the following error occurs:
java.lang.UnsupportedOperationException: Failed to create a Robolectric sandbox: Android SDK 29 requires Java 9 (have Java 8)
We noticed in the Dockerfile that openjdk-8-jdk is being used, are we missing something?
I'm not really sure what the best path is here, as there's no openjdk-9-jdk
package, and Java 11 will only be supported "soon" (Android Studio 4.2, it seems).
This comment provides some alternatives: https://stackoverflow.com/a/59649406
I'll see if using Java 11 works for my projects, then i'll update the image.
Sorry, all the stuff i read points to Java 8 still being the right version to use. For the sake of compatibility, i will stick to that version. Maybe the comment linked above is of help to you.
Quick note: i've created a new tag/release for API level 30, and that's using OpenJDK 11