Skip to content

[integration_test] build failed when using AGP 8 in release mode #127388

@cuong0993

Description

@cuong0993

Is there an existing issue for this?

Steps to reproduce

  1. Create a new project
  2. Add integration_test package
  3. Build in release mode

Expected results

Build successful

Actual results

Build failed

Code sample

https://github.com/cuong0993/integration_test_agp8

Screenshots or Video

image

Logs

Running Gradle task 'assembleRelease'...
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1336 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /integration_test_agp8/build/app/outputs/mapping/release/missing_rules.txt.
ERROR: R8: Missing class org.kxml2.io.KXmlParser,org.kxml2.io.KXmlSerializer (referenced from: java.util.List kotlinx.coroutines.internal.FastServiceLoader.load(java.lang.Class, java.lang.ClassLoader))

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:minifyReleaseWithR8'.

A failure occurred while executing com.android.build.gradle.internal.tasks.R8Task$R8Runnable
Compilation failed to complete

  • 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.

BUILD FAILED in 12s
Running Gradle task 'assembleRelease'... 13.1s
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1

Flutter Doctor output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.1, on macOS 13.3.1 22E772610a darwin-arm64, locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.2)
[✓] IntelliJ IDEA Community Edition (version 2023.1.2)
[✓] VS Code (version 1.78.2)
[✓] Connected device (2 available)
[✓] Network resources

• No issues found!

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work lista: buildBuilding flutter applications with the toola: releaseChallenges faced when attempting to productionize an appc: crashStack traces logged to the consolef: integration_testThe flutter/packages/integration_test pluginfound in release: 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyr: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions