Skip to content

Upgrading to gradle 7.x.x results in error #364

@Biplab-Dutta

Description

@Biplab-Dutta

Description
Upgrading the gradle version in my project to 7.x.x gave me an error. The build failed with an exception.

Steps To Reproduce

  1. Upgrade the gradle version to 7.x.x
  2. run flutter clean && flutter pub get
  3. Run the application
  4. The build fails with an exception

Expected Behavior
The app should get built without any issues.

Debug Console

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred evaluating project ':app'.
> No signature of method: build_9h8ncssudixpkyij8qn8c838g.android() is applicable for argument types: (build_9h8ncssudixpkyij8qn8c838g$_run_closure2) values: [build_9h8ncssudixpkyij8qn8c838g$_run_closure2@78ce4e17]

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]()

BUILD FAILED in 5s
Exception: Gradle task assembleDevelopmentDebug failed with exit code 1

THE SOLUTION
In the app-level build.gradle, go to buildTypes and remove the line useProguard true

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expected

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions