Skip to content

Problem when running "flutter build aar" using AGP 8.1 + JDK 17 #154371

@caveg002

Description

@caveg002

Steps to reproduce

  1. Set up a flutter module with Flutter 22.2 + AGP 8.1 + JDK 17
  2. Try to generate the AAR running flutter build aar

Note: this project has dependency on other flutter plugins, published in dispub, as well as other 3rd party and Android AAR dependencies.

Actual results

gives this error:

FAILURE: Build failed with an exception.

Where:
Initialization script '/Users/user/flutter_envs/flutter_macos_3.22.2-stable/flutter/packages/flutter_tools/gradle/aar_init_script.gradle' line: 148

What went wrong:
Cannot invoke method dependsOn() on null object. 

Logs

Logs
<!-- Paste your logs here -->

Flutter Doctor output

Doctor output
<!-- Paste your output here -->

Metadata

Metadata

Assignees

Labels

P0Critical issues such as a build break or regressiona: existing-appsIntegration with existing apps via the add-to-app flowcustomer: castawayfound in release: 3.24Found to occur in 3.24found in release: 3.25Found to occur in 3.25has reproducible stepsThe issue has been confirmed reproducible and is ready to work onr: fixedIssue is closed as already fixed in a newer versiont: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions