android-sdk-image
android-sdk-image copied to clipboard
Broken on a macOS M1
This docker image breaks on a macOS M1:
Starting a Gradle Daemon (subsequent builds will be faster)
WARNING: The following problems were found when resolving the SDK location:
Where: sdk.dir property in local.properties file. Problem: Directory does not exist
Checking the license for package Android SDK Build-Tools 35 in /opt/android-sdk-linux/licenses
License for package Android SDK Build-Tools 35 accepted.
Preparing "Install Android SDK Build-Tools 35 v.35.0.0".
"Install Android SDK Build-Tools 35 v.35.0.0" ready.
Installing Android SDK Build-Tools 35 in /opt/android-sdk-linux/build-tools/35.0.0
"Install Android SDK Build-Tools 35 v.35.0.0" complete.
"Install Android SDK Build-Tools 35 v.35.0.0" finished.
Checking the license for package Android SDK Platform 35 in /opt/android-sdk-linux/licenses
License for package Android SDK Platform 35 accepted.
Preparing "Install Android SDK Platform 35 (revision 2)".
"Install Android SDK Platform 35 (revision 2)" ready.
Installing Android SDK Platform 35 in /opt/android-sdk-linux/platforms/android-35
"Install Android SDK Platform 35 (revision 2)" complete.
"Install Android SDK Platform 35 (revision 2)" finished.
[=======================================] 100% Fetch remote repository...
AAPT2 aapt2-8.10.0-12782657-linux Daemon #0: Unexpected error output: rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
AAPT2 aapt2-8.10.0-12782657-linux Daemon #1: Unexpected error output: rosetta error: failed to open elf at /lib64/ld-linux-x86-64.so.2
AAPT2 aapt2-8.10.0-12782657-linux Daemon #0: Unexpected error output:
AAPT2 aapt2-8.10.0-12782657-linux Daemon #1: Unexpected error output:
> Task :app:processDebugResources FAILED
WARNING: The following problems were found when resolving the SDK location:
Where: sdk.dir property in local.properties file. Problem: Directory does not exist
[Incubating] Problems report is available at: [REDACTED]
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform android-sdk-11.8.8.aar (org.maplibre.gl:android-sdk:11.8.8) to match attributes {artifactType=android-compiled-dependencies-resources, com.android.build.api.attributes.ProductFlavor:renderer=drawable, org.gradle.category=library, org.gradle.jvm.environment=android, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=androidJvm, renderer=drawable}.
> Execution failed for AarResourcesCompilerTransform: /root/.gradle/caches/8.14/transforms/68d3c7c5e05727e30ae7943dd8399a7c/transformed/android-sdk-11.8.8.
> AAPT2 aapt2-8.10.0-12782657-linux Daemon #0: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
> Failed to transform core-1.16.0.aar (androidx.core:core:1.16.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for AarResourcesCompilerTransform: /root/.gradle/caches/8.14/transforms/cb59a10411916d084c6da237697f809c/transformed/core-1.16.0.
> AAPT2 aapt2-8.10.0-12782657-linux Daemon #1: Daemon startup failed
This should not happen under normal circumstances, please file an issue if it does.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.14/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 6m 4s
Not sure if there's a workaround. Can you please fix?
BTW, we're using it in GitLab with our own runners that are all running on macOS M1 machines.