Skip to content

CI failing in Android build as out of memory #1330

@gnprice

Description

@gnprice

Starting Monday around 48 hours ago, our CI runs have all been failing with a "Java heap space" error in the android suite, like this:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Error while evaluating property 'friendPathsSet$kotlin_gradle_plugin_common' of task ':app:compileDebugKotlin'.
   > Could not resolve all files for configuration ':app:debugCompileClasspath'.
      > Failed to transform armeabi_v7a_debug-1.0.0-1b328e5729f5f67e0c5eef98e71346eab09362d4.jar (io.flutter:armeabi_v7a_debug:1.0.0-1b328e5729f5f67e0c5eef98e71346eab09362d4) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}.
         > Execution failed for JetifyTransform: /home/runner/.gradle/caches/modules-2/files-2.1/io.flutter/armeabi_v7a_debug/1.0.0-1b328e5729f5f67e0c5eef98e71346eab09362d4/b10386682e6ae1fede7cec7ff90ed6852c8a3d64/armeabi_v7a_debug-1.0.0-1b328e5729f5f67e0c5eef98e71346eab09362d4.jar.
            > Java heap space

So the JVM under Gradle is running out of memory.

The workaround is we'll increase the limit of memory Gradle is allowed to use, in #1324.

It turns out the increase in needed memory is real steep, though — the limit was 1.5 GiB and it was running fine, and now (as @PIG208 determined in #1324) even 2.5 GiB isn't enough. (The PR makes it 3 GiB.) So it'd be good to spend a bit of time trying to pin down what caused the change, to see if there's something to fix upstream.

Chat thread: https://chat.zulip.org/#narrow/channel/516-mobile-dev-help/topic/Execution.20failed.20for.20task.20'.3Aapp.3AcompileDebugKotlin'/near/2076887

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-AndroidIssues specific to Android, or requiring Android-specific worka-toolsOur own development tooling, scripts, and infrastructure

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions