react-native-community/docker-android

How to update JDK version?

robrechtme opened this issue · 2 comments

Hi! In order to target SDK version 31 (Android 12), the project must be built with JDK 11 or higher (see unrecognized Attribute name MODULE).

Is it possible to extend from this image and change the JDK version?

It looks like JDK 11 is already installed. In your Dockerfile, you could try to overwrite the JAVA_HOME env variable with a similar path, but for openjdk-11:

ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

I will try that, thanks!