This is an issue in both Android Studio and IntelliJ. I've tried previous versions of both and still have the same issue.
Basically I'm wanting to do the Android X migration for our Flutter app in order to use the latest plugins, and I was having the issues detailed here https://stackoverflow.com/questions/54395491/unable-to-migrate-to-androidx/54618207 I then go to open just the android module in Android Studio rather than the whole project, and find that the Flutter option when right clicking is greyed out. To note when I do the same on the root project folder or the ios module, I get the option Open iOS module in Xcode under the non-greyed out Flutter menu item.


flutter doctor output:
[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14 18A391, locale en-GB)
• Flutter version 1.2.1 at /Users/niamhpower/development/flutter
• Framework revision 8661d8aecd (2 weeks ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/niamhpower/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/niamhpower/Library/Android/sdk
• Java binary at: /Applications/Android Studio 3.4 Preview.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b22)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Xcode 10.2, Build version 10P99q
• ios-deploy 1.9.4
• CocoaPods version 1.6.0.beta.2
[✓] Android Studio
• Android Studio at /Applications/Android Studio 3.4 Preview.app/Contents
• Flutter plugin version 33.3.2
• Dart plugin version 183.5901
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b22)
[✓] IntelliJ IDEA Community Edition (version 2018.2.5)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 31.3.3
• Dart plugin version 182.5215
[!] VS Code (version 1.30.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
✗ Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
! Doctor found issues in 1 category.
Any update about this?
I have the same issue. I solved it temporary opening the android folder like a separate project in Android Studio
Having the same problem
UPDATE:
Seems like in my case, upgrading to Android Studio 3.3 (Which I just did prior to this error) remove the Flutter plugin
After reinstalling the Flutter plugin again, the _Flutter_ menu did showed up, but when I clicked it, Android Studio show a error message saying 'process error, access denied'
After I restarted Android Studio, that _access denied_ problem gone away.
Then, I clicked it again, after some process in the background Android Studio asked me to upgrade my gradle to version 4.10.1

I faced this problem because my Flutter project's Firebase plugin have some error
Some additional resources:
https://stackoverflow.com/questions/51797219/failed-to-resolve-variable-animal-sniffer-version-when-migrate-to-androidx
https://stackoverflow.com/questions/54395491/unable-to-migrate-to-androidx
https://developer.android.com/jetpack/androidx/migrate
https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
Same problem here! Any updates?
No update or solution found yet, @diegoalvis I did the same, opening it by going into the folder from Android Studio
Same here, last flutter plugin
me too, my Flutter button is disabled
any update?
This is also a problem for me. I really need to migrate to AndroidX, any suggestions?
any update? I have the same problem here...
I solved it. What I did is deleted the modules from my project and specify them again:
1.- File >> Project Structure...

2.- Delete all the modules
Take care here, check all the set-ups before delete them all.

3.- Create a Flutter "New Module", in the same project root
Click the "+" symbol, and in the next screen pick up "Flutter" >> "Next" button.

4.- Choose the project root
Don't change the "module name", just target the content root to your project root, and check that all it's fine.

5.- It's done
Check if the "Flutter" option is enabled now. Don't forget to import the Android module.

@Rostanxd thank you mate, it helped me, but for other ppl I want to warn to be careful with project root name, I mean if your project root name separated with '-' , then before deleting the module you should change your project root name to be with underlines '_'. In my case it was this way, 1. I changed the module name. 2. I changed the project root folder name and only after this steps I could do the steps that @Rostanxd said, if you will delete the module and start to add a new one by mentioning your project folder, which name with '-' , dart wont allow you to add such name, and you will need to close that window and go to change the project root name, but you allready deleted the module :) , this bringing many issues, that why I'm suggesting, before deleting the module be sure that everything is ok with project root name
I solved it. What I did is deleted the modules from my project and specify them again:
1.- File >> Project Structure...
2.- Delete all the modules
Take care here, check all the set-ups before delete them all.
3.- Create a Flutter "New Module", in the same project root
Click the "+" symbol, and in the next screen pick up "Flutter" >> "Next" button.
4.- Choose the project root
Don't change the "module name", just target the content root to your project root, and check that all it's fine.
5.- It's done
Check if the "Flutter" option is enabled now. Don't forget to import the Android module.
thanks, all my code is now gone after following your guide
I solved it. What I did is deleted the modules from my project and specify them again:
1.- File >> Project Structure...
2.- Delete all the modules
Take care here, check all the set-ups before delete them all.
3.- Create a Flutter "New Module", in the same project root
Click the "+" symbol, and in the next screen pick up "Flutter" >> "Next" button.
4.- Choose the project root
Don't change the "module name", just target the content root to your project root, and check that all it's fine.
5.- It's done
Check if the "Flutter" option is enabled now. Don't forget to import the Android module.
thanks, all my code is now gone after following your guide
Try to rollback your project files via local history.
right click on your project name and choose local history, find the point that you need and rollback
I tried something that worked for me:
got File -> open project and select the android sub folder of your flutter project.
Your project will oad and you will have a pop up that tells you to update the Gradle plugin, click on Update.
In Android Studio click on the Tools -> SDK Manager -> SDK Tools menu and verify that you have selected the Google Play Services option. In case the box is empty, they click on it and then install it.
Go for the android folder then the app folder inside it and open the gradle.build file, search for the property compileSdkVersion and change the value to 28.
Open the gradle.properties file and add the following lines:
android.useAndroidX=true
android.enableJetifier=true
Then in the file tree on the left panel, at the top change the Android mode by Project, right click on the android folder and select the Migrate to AndroidX option under Refactor. A window appears to inform you that it will make a backup if we want, then click the Migrate button.
Execute flutter clean after it.
It worked for me I hope it will for you !
Updating Android Studio to the new version (3.5) brought this problem to me. Tried all the solutions, but none of them were effective... Any news?
For me, the Flutter option is greyed out, but I'm still able to open the Android project by using File > Open, and selecting the Android project within the Flutter project.
All options didn't work for me. The only workaround is the same as @wdavies973
I hope Android Studio fix this error quickly.
Updating Android Studio to latest version seems solve the problem
Updated to Android Studio 3.5 Build number 191.5791312 Build date 8/8/2019. The problem still persists. The work-around stated above worked once. The flutter menu was enabled after I clicked on it, though the issue returned


I have the same issue. Flutter button is still disabled.
I have the same issue with Android Studio 3.5

I recently downgraded my android studio from 3.5 to 3.4.1, and the issue is still there; but the dart and flutter plugins are the of latest version. So, I think it has to do something with the plugins themselves.
@stevemessick - is this something that will be addressed by https://github.com/flutter/flutter-intellij/pull/3909?
@devoncarew
I think I found the issue - it's quite simple, please check my answer at SO:
https://stackoverflow.com/a/58576562/9545222
I think I found the issue - it's quite simple, please check my answer at SO:
https://stackoverflow.com/a/58576562/9545222
It worked for me, but the .iml file must end up with android, so eg. "your_app_name_android.iml"
@BaranMichal25 Yes, it's the point.
Try this
got File -> Open Recent project and select your flutter project.
I tried something that worked for me:
got File -> open project and select the android sub folder of your flutter project.Your project will oad and you will have a pop up that tells you to update the Gradle plugin, click on Update.
In Android Studio click on the Tools -> SDK Manager -> SDK Tools menu and verify that you have selected the Google Play Services option. In case the box is empty, they click on it and then install it.
Go for the android folder then the app folder inside it and open the gradle.build file, search for the property compileSdkVersion and change the value to 28.
Open the gradle.properties file and add the following lines:
android.useAndroidX=true android.enableJetifier=trueThen in the file tree on the left panel, at the top change the Android mode by Project, right click on the android folder and select the Migrate to AndroidX option under Refactor. A window appears to inform you that it will make a backup if we want, then click the Migrate button.
Execute flutter clean after it.
It worked for me I hope it will for you !
It Worked! Thank you!
when I create the project, then i face this issue
image1.docx
I had the same issue, found a solution that worked for me. Pasting the link here.
https://stackoverflow.com/questions/54364690/flutter-open-android-module-in-android-studio-is-disabled
Because you lost the xxx_android.iml file in android directory, it cannot be recognized as an android project.
So you only need to copy a xxx_android.iml file from other projects to the android directory.
Note, replace xxx with your project name
I solved it. What I did is deleted the modules from my project and specify them again:
1.- File >> Project Structure...
2.- Delete all the modules
Take care here, check all the set-ups before delete them all.
3.- Create a Flutter "New Module", in the same project root
Click the "+" symbol, and in the next screen pick up "Flutter" >> "Next" button.
4.- Choose the project root
Don't change the "module name", just target the content root to your project root, and check that all it's fine.
5.- It's done
Check if the "Flutter" option is enabled now. Don't forget to import the Android module.
it works for me thank you
it works for me thank you
Apologize for posting another comment on closed issue, but since no one mentioned it, running the command below may help
flutter create .
Take note of the flutter SDK version though, different versions might produce different results.
also works when project name is changed in pubspec.yaml, directory change, etc.
In fact, running the command can help other missing file related issue as it (re)creates all necessary file for flutter to work.
This worked for me:
Go to the Android-Studio Terminal
Then type:
flutter clean
flutter upgrade
flutter pub get
fluter create . <- Don't forget the space between the "e" and the "."
After these steps the Flutter Symbole is available.
Then move to it and click "Open for editing in Android Studios".
You will see the flutter register on the top right side.
Then go to it and move to android->tasks->android->signingReport <-double tap on it.
Now at the Bottom you will find the SHA1 Key.
Because you lost the xxx_android.iml file in android directory, it cannot be recognized as an android project.
So you only need to copy a xxx_android.iml file from other projects to the android directory.
Note, replace xxx with your project name
This worked for me:
Go to the Android-Studio Terminal
Then type:
flutter clean
flutter upgrade
flutter pub get
fluter create . <- Don't forget the space between the "e" and the "."After these steps the Flutter Symbole is available.
Then move to it and click "Open for editing in Android Studios".
You will see the flutter register on the top right side.
Then go to it and move to android->tasks->android->signingReport <-double tap on it.
Now at the Bottom you will find the SHA1 Key.
Work like a charm !
Most helpful comment
For me, the Flutter option is greyed out, but I'm still able to open the Android project by using File > Open, and selecting the Android project within the Flutter project.