question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Swapping Flutter SDKs via IDE doesn't work with web builds.

See original GitHub issue

I just got off a chat with @DanTup, who asked me to file an issue on this. Set up: I have three Flutter SDKs installed: /stable - my main SDK, which my PATH points to / dev - downloaded from https://flutter.dev/docs/development/tools/sdk/releases /master - checked out via git

I want to be able to use the stable SDK for my mobile app, and the dev SDK for playing around with flutter web.

If I use flutter channel dev to change my main SDK, and then debug a web project, then it will compile and launch correctly.

However, if my main SDK is on the stable channel, and I use the SDK chooser in VSCode (bottom bar) to select the dev channel SDK, then it will generate the following errors when I debug: Error: Error when reading '../../_SDKs/dev/packages/flutter_tools/.packages': No such file or directory

I checked, and that file does not exist. It does exist in my main SDK if I use flutter channel to swap it to dev. I did run 'Flutter: Run Flutter Upgrade` against the /dev SDK, but that didn’t fix anything. Both are SDK v1.10.4.

Given all of that, I’m not sure if this is an issue with the VSCode plugin, the package from the SDK download page, or if I should be running some command against the downloaded SDK in order to generate the .packages file.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jonahwilliamscommented, Sep 30, 2019

One way to verify this would be to run flutter update-packages and then re-run, it should work

0reactions
DanTupcommented, Oct 1, 2019

Yeah, spot on. Running update-packages for that version of Flutter solves the issue.

I’ve opened https://github.com/flutter/flutter/issues/41681 to track this, since I presume this should be handled inside Flutter (either automatically, or by the packages file being in zips).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter plugin not installed error; When running 'flutter doctor'
Go to Android studio → Settings → plugins → in the search bar search for Flutter and Dart plugins. If you are installing...
Read more >
Switching the Live Streaming Client Role Using the ... - Agora.io
This tutorial explains how to switch the client role from audience to broadcaster in a live video streaming app using the Agora RTM...
Read more >
Setting up FVM (Flutter Version Management) properly
Now to change the current Flutter version open the command palette and run Flutter: Change SDK . You should see only those versions...
Read more >
A very good Flutter setup
A very good guide to help you install and configure your local environment for Flutter projects. Includes step-by-step instructions for ...
Read more >
Test drive - Flutter documentation
Run the app ... Select a device from the Device Selector area. For details, see Quickly switching between Flutter devices. If no device...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found