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
Can't run Flutter project if it's within a Bazel directory #4825
Comments
I guess my hunch about #4735 was wrong actually, since that's only on |
Switching to the dev channel doesn't seem to fix this either. |
Hmmm #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 |
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
|
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
Our code checks for the presence of a |
@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
The text was updated successfully, but these errors were encountered: