Closed rohansingh closed 3 years ago
I guess my hunch about #4735 was wrong actually, since that's only on master
and hasn't even been released. Apologies.
Switching to the dev channel doesn't seem to fix this either.
Hmmm https://github.com/flutter/flutter-intellij/pull/4735 should be merged, but I think we may have missed it in the list of changes for August. Can you download v48.0.4 from July and try that out? https://plugins.jetbrains.com/plugin/9212-flutter/versions (You can use a downloaded plugin by going to Preferences -> Plugins -> (settings button) -> Install Plugins from Disk)
Unfortunately I don't seem to be able to install any Flutter plugin version from disk.
This is with Android Studio 4.0.1 on macOS. I've tried completely blowing away and reinstalling Android Studio, but unfortunately that hasn't had any effect 😐
Also tried several different versions of the plugin, but same result.
I'm sorry, I recommended the wrong version! I was able to install v48.0.2 of the plugin onto my Android Studio 4.0, can you try that one instead?
Ah, I see, I didn't realize that certain versions only work with certain build numbers.
Anyway, I did as you asked and installed v48.0.2, and it worked. I am able to build and run my Flutter app again.
Thanks for checking; it's likely there is an issue with our bazel check, so we'll look into it.
Last thing, can you send along your log? Help -> show log in finder
Here's my idea.log
. It captures multiple launches of the IDE, with both v48.0.2 (working) and v49.0.2 (broken).
It is a bug that we are detecting that your project is a bazel project. We should only be detecting that google3 bazel projects are bazel projects. Did you happen to add a flutter.json file or in a previous version of the plugin check the checkbox to indicate that your project is a flutter bazel project? We've removed that checkbox but perhaps we still have logic checking whether you have manually indicated the project was bazel that is causing problems.
It's certainly possible that I checked a box like that. However I can't seem to find any flutter.json
file in my project directory currently. I've also tried deleting everything that I can think of:
rm -rf .idea
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*
it is a bug that we are classifying the project as Bazel. Hopefully the issue is just that somewhere in our code we are still using the old confusing manually configurable setting to indicate your project is bazel.
@jacob314 Makes sense, but any idea where that setting would be persisted?
I'm having the same issue. My repository is a mono repo with Kotlin, C++ and Flutter projects. I have the Flutter project in one folder and a C++ Bazel project in another folder, they are not related, but Intellij recognizes the bazel project and configures the Flutter SDK to that Bazel project, which even is not a Flutter project.
Thanks for the info (and the patience). I'm not finding a particular setting that can be changed to indicate a bazel project, but I'll look into the checks within the plugin. In the meantime, I recommend using an older version of the plugin, 48.0 or earlier if you can.
@rohansingh is your setup something like this, and does it have a WORKSPACE
file near the top level?
Our code checks for the presence of a WORKSPACE
file to recognize if a project is bazel, before checking for a pubspec.yaml file. We may be able to fix the problem by reversing the order of these checks.
@helin24 Yup, that's exactly how my project is setup.
I have a Flutter project that's within a Bazel directory. It's not built by Bazel in any way, but it happens to be in a monorepo that uses Bazel for most other things.
Running and debugging from within Android Studio used to work fine, but is now broken. Trying to launch
main.dart
results in an error:Looking at Preferences > Languages & Frameworks > Flutter shows that the Flutter SDK path has changed to
/Users/rohan/tidbyt/null <set by bazel project>
. That isn't a valid path on my machine. Resetting the setting here doesn't seem to do anything.I have a hunch that this is related to #4735 (/cc @helin24 @jacob314). My guess is that that broke the IntelliJ plugin for Flutter projects in Bazel directories outside of Google.
Steps to Reproduce
Version info