I am using Bitbucket CI/CD Pipelines to make a Release build of my Android Application.
Here I am facing an issue while creating Android Release build.
It says
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
And I have tried the same but looks like CI/CD has nothing to do with System and IDE. Then How should I make gradle work with JAVA 11?
Below is my yml file
image: androidsdk/android-30
pipelines:
default:
- parallel:
- step:
name: Lint
caches:
- gradle
script:
- ./gradlew lint
artifacts:
- app/build/reports/**
- step:
name: Build Release
image: bitbucketpipelines/android-ci-image
caches:
- gradle
script:
- echo $KEYSTORE_FILE_BASE64 | base64 --decode > $KEYSTORE_FILE
- ./gradlew assembleRelease
artifacts:
- app/build/outputs/**
Some of the Answer on here says need to add
image: openjdk:11-jdk
But where should i add that it already have android-30 image to make andorid build