aws / aws/aws-codebuild-docker-images
Using Android Images (runtime 28+29) does not work anymore as Android Tools require Java 11 and the images require Corretto 8
- Dominant language
- Dockerfile
- Stars
- 1.2k
- Forks
- 971
- Avg merge
- 2h 47m
- Merged PRs (30d)
- 1
Description
**Describe the bug**
Using Android Images (runtime 28+29) does not work anymore as Android Tools require Java 11 and the images require Corretto 8
Error message in codebuild:
`[Container] 2022/06/10 16:15:29 Waiting for agent ping
--
2 | [Container] 2022/06/10 16:15:30 Waiting for DOWNLOAD_SOURCE
3 | [Container] 2022/06/10 16:15:31 Phase is DOWNLOAD_SOURCE
4 | [Container] 2022/06/10 16:15:31 CODEBUILD_SRC_DIR=/codebuild/output/src686247844/src
5 | [Container] 2022/06/10 16:15:31 YAML location is /codebuild/readonly/buildspec.yml
6 | [Container] 2022/06/10 16:15:31 Processing environment variables
7 | [Container] 2022/06/10 16:15:31 Resolved 'android' runtime alias 'latest' to '29'.
8 | [Container] 2022/06/10 16:15:31 Selecting 'android' runtime version '29' based on manual selections...
9 | [Container] 2022/06/10 16:15:31 Selecting 'java' runtime version 'corretto11' based on manual selections...
10 | [Container] 2022/06/10 16:15:31 Runtime 'android' version '29' has a dependency on runtime 'java', but 'java' version 'corretto11' has already been manually selected. Not attempting to override.
11 | [Container] 2022/06/10 16:15:33 Phase complete: DOWNLOAD_SOURCE State: FAILED
12 | [Container] 2022/06/10 16:15:33 Phase context status code: YAML_FILE_ERROR Message: Runtime android version 29 requires selecting one of the following versions of java: corretto8
`
**To Reproduce**
* set image to Amazon Linux 2 and Android Runtime 29
* start build (I used flutter build apk)
**Expected behavior**
Fluter app should be build
**Logs**
see
`[Container] 2022/06/10 16:15:29 Waiting for agent ping
--
2 | [Container] 2022/06/10 16:15:30 Waiting for DOWNLOAD_SOURCE
3 | [Container] 2022/06/10 16:15:31 Phase is DOWNLOAD_SOURCE
4 | [Container] 2022/06/10 16:15:31 CODEBUILD_SRC_DIR=/codebuild/output/src686247844/src
5 | [Container] 2022/06/10 16:15:31 YAML location is /codebuild/readonly/buildspec.yml
6 | [Container] 2022/06/10 16:15:31 Processing environment variables
7 | [Container] 2022/06/10 16:15:31 Resolved 'android' runtime alias 'latest' to '29'.
8 | [Container] 2022/06/10 16:15:31 Selecting 'android' runtime version '29' based on manual selections...
9 | [Container] 2022/06/10 16:15:31 Selecting 'java' runtime version 'corretto11' based on manual selections...
10 | [Container] 2022/06/10 16:15:31 Runtime 'android' version '29' has a dependency on runtime 'java', but 'java' version 'corretto11' has already been manually selected. Not attempting to override.
11 | [Container] 2022/06/10 16:15:33 Phase complete: DOWNLOAD_SOURCE State: FAILED
12 | [Container] 2022/06/10 16:15:33 Phase context status code: YAML_FILE_ERROR Message: Runtime android version 29 requires selecting one of the following versions of java: corretto8
`
**Platform (please complete the following information):**
- OS: Linux x86, Amazon Linux 2
**Additional context**
Since July 2021 - https://developer.android.com/studio/releases/gradle-plugin#jdk-11 the Gradle Toolkit provided by Google requires Java 11
The runtime is java corretto8 in the runtime - maybe upping this to java 11 might be the solution?
https://github.com/aws/aws-codebuild-docker-images/blob/master/al2/x86_64/standard/3.0/runtimes.yml
Contributor guide
Research direction
Start with al2/x86_64/standard/3.0/runtimes.yml and reproduce the Amazon Linux 2 build using Android runtime 29 with Java corretto11. Compare the declared runtime dependency with the Android tooling requirements; done means the selected runtimes are compatible and the Flutter Android build proceeds past DOWNLOAD_SOURCE.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, aws, java
- Domain
- build-system, cloud, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100