Skip to content

flutter build apk/appbundle with flavors has stopped working #34598

@nate-eisner

Description

@nate-eisner

We cannot build an apk or app bundle anymore when using dev or master channel. (It seems to have stopped working after 8627ff4 was merged)

Steps to Reproduce

  1. Create a new fluter project
  2. Add "productFlavors" in the android/app/build.gradle (ex: app1, app2)
  3. switch to dev or master channel
  4. run flutter build apk --flavor=app1

Logs

Full build apk log

Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForApp1Release'.
[        ] > More than one file was found with OS independent path 'lib/armeabi-v7a/libapp.so'
[        ] * 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.
[        ] * Get more help at https://help.gradle.org
[        ] BUILD FAILED in 1s
➜ flutter doctor                    
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v1.7.4, on Mac OS X 10.14.5 18F203, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] iOS tools - develop for iOS devices
[✓] Android Studio
[✓] Android Studio (version 3.4)
[✓] Android Studio
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.35.1)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions