-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Steps to reproduce
flutter create testprojectcd testprojectflutter build apk --target-platform=android-arm64 --debug
Expected results
The resulting app-debug.apk only contains code for android-arm64.
Actual results
The resulting app-debug.apk contains code for android-arm, android-arm64, android-x86, android-x64.
When running without --debug, i.e. flutter build apk --target-platform=android-arm64 then the resulting app-release.apk correctly contains only code for android-arm64.
Why this is relevant
I am using https://github.com/cunarist/rinf. Sometimes you have to do a flutter clean. And (re)compiling Rust code for 4 target archs takes a loooong time. But I only need and only want to compile for one arch. I expect --target-platform to work with --debug.
Alternatively (but not ideal), the output of flutter build apk --help should indicate that these two options are incompatible.
Code sample
No need for a code sample. Just run flutter create testproject and use that.
Screenshots or Video
n/a
Logs
n/a
Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 14.5 23F79 darwin-arm64, locale en-CH)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[✓] Android Studio (version 2024.1)
[✓] VS Code (version 1.92.0)
[✓] Connected device (3 available)
[✓] Network resources
! Doctor found issues in 1 category