Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio Flamingo & JDK 17 #120

Closed
nicolasygrand opened this issue Apr 14, 2023 · 7 comments
Closed

Android Studio Flamingo & JDK 17 #120

nicolasygrand opened this issue Apr 14, 2023 · 7 comments

Comments

@nicolasygrand
Copy link

Android Studio Flamingo is now stable and one of notable changes is embedded JDK moved to 17.

Currently, docker-android releases only bring JDK 8/11.

@sjcqs
Copy link
Contributor

sjcqs commented Apr 17, 2023

You can use setup-java to install the JDK 17

      - uses: actions/setup-java@v3
        with:
          distribution: zulu
          java-version: '17'

@nicolasygrand
Copy link
Author

Right. That's what I used to update my CI/CD. But it's a cost of 40 seconds of execution time.

@Ivan-Angelov-Ivanov
Copy link

Ivan-Angelov-Ivanov commented Jul 11, 2023

Hello, recently I've configured my to use JDK 17. Currently I'm using docker-android for build and deploy. Unfortunately setup-java is not resolving my issue during deployment:
image

Any hints on how to resolve it? The configurations on the app side regarding JDK 17 are correct.
Will there be in the near future docker images supporting JDK 17?

@nicolasygrand
Copy link
Author

On my side, I install JDK 17 manually with something like this.

 - name: Install JDK 17
        run: apt-get update && apt-get install -y openjdk-17-jdk && export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"

@Ivan-Angelov-Ivanov
Copy link

Ivan-Angelov-Ivanov commented Jul 19, 2023

On my side, I install JDK 17 manually with something like this.

 - name: Install JDK 17
        run: apt-get update && apt-get install -y openjdk-17-jdk && export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"

Unfortunately, it returns the same error.

Edit: After some attempts, I realized that every time the workflow starts to execute fabernovel docker, JAVA_HOME overrides what was exported beforehand from the task above, so instead of running separate task for JDK 17 I set the configuration inside the exec block of the task which is using the docker container thus JAVA_HOME remains with the JDK 17 path:

- name: Execute Build and Deploy
        uses: fabernovel/[email protected]
        with:
          docker-android-tag: api-29-ndk-v1.1.0
          exec: |
            apt-get update;
            apt-get install -y curl openjdk-17-jdk;
            export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"....

@AngeloAvv
Copy link
Contributor

Is this repository no longer maintained?

@flolom
Copy link
Member

flolom commented Dec 4, 2023

Hello, version 1.8.0 has been released and supports API 34 and JDK 17

You can use docker://fabernovel/android:api-34-v1.8.0 in your github action file

@flolom flolom closed this as completed Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants