Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_tool_runner.dill is removed after running "Profile" or "Release" mode with Android Studio #460

Open
alexgarbarev opened this issue Oct 26, 2024 · 0 comments

Comments

@alexgarbarev
Copy link

Hi, I found an issue which is easy to reproduce on a fresh flutter app.

Steps to reproduce:

  1. Create a new Flutter project.
  2. Add dependency that needs super_native_extensions. In my case I've added super_clipboard: ^0.8.24
  3. Run debug on any platform. In my case I ran it on macos with Android Studio: Run -> Run 'main.dart'
  4. Run profile mode on the same platform. I ran it on macos with Android Studio: Run -> Flutter Run 'main.dart' in Profile mode
  5. Run debug mode again, same as in step (3): Run -> Run 'main.dart'

These steps results into a build failure:

Could not find a command named "bin/build_tool_runner.dill".

I've tried to investigate the root cause of that issue, and so far I found that this issue is related to Android Studio Flutter plugin.
If we replace steps 3, 4, 5 to run via terminal: flutter run -d macos and flutter run -d macos --profile - it works as expected.

However, while running the app through Android Studio in either "Profile" or "Release" mode, it deletes all *.dill files in the build folder.. So subsequent runs in "Debug" or "Profile"/"Release" mode gets broken..

I would appreciate any idea how to fix this properly. I guess we need to modify build scripts to generate dill file again or something (I'm not familiar with the build system here).

The only temporary fix is to run flutter clean and build again from scratch.. but it takes longer to launch.

My environment:

Flutter 3.24.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 603104015d (2 days ago) • 2024-10-24 08:01:25 -0700
Engine • revision db49896cf2
Tools • Dart 3.5.4 • DevTools 2.37.3

rustup 1.27.1 (54dd3d00f 2024-04-24)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.82.0 (f6e511eec 2024-10-15)`

Android Studio Ladybug | 2024.2.1 Patch 1
Build #AI-242.23339.11.2421.12483815, built on October 11, 2024

Flutter plugin: 82.0.3
Dart plugin: 242.22855.32

macOS 14.7 arm64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant