Flutter build apk fails on an app using Android Gradle plugin 4.0

Steps to Reproduce

  1. Run flutter create counter
  2. Update the app to use Android Gradle plugin 4.0.0
  3. Run flutter build apk

Solution

The libapp.so libraries containing the app's compiled Dart code are packaged in a JAR, and a different JAR is generated for each variant. I'm not sure how dynamically generated per-variant JARs are supposed to be handled if the lint task expects all variants' JARs to be available.

As a hack workaround, you could change the lintOptions in app/build.gradle to disable the lint task:

The pipeline passed successfully!!!

--

--

--

DevOps engineer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Kotlin Coroutines-Async/Await(Part 3)

Fragment and its lifecycle

How to add Bottom Navigation in the app in Android Kotlin ?

Navigation: Multiple back stacks

Flutter: Project Structure and Hello world

Why Should You Start Android App Development With Kotlin?

Why Should You Start Android App Development With Kotlin?

Android Fraud Detection with HMS Safety Detect Kit

Minimize playing content in the Flutter app with Overlay.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Saket Jain

Saket Jain

DevOps engineer

More from Medium

Different plugin for the database in a flutter

Creating a Flutter Project Template

Document type storage in Flutter using Hive

Flutter: Create horizontal & vertical dotted, dashed & solid Divider component (widget) example.