No 'Flutter' menu option on android module
See original GitHub issueSteps to Reproduce
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.
Logs
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.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:28
- Comments:40 (1 by maintainers)
Top Results From Across the Web
Flutter: Open android module in Android Studio is disabled
Right click on android folder > New > File · Rename the new file myproject_android.iml (change myproject to your project name) · Paste...
Read more >Flutter menu option is disabled, to Open Android module in ...
After setup Flutter project code from Git repository. To open android module right click on project and generally it should show as Flutter...
Read more >Integrate a Flutter module into your Android project
Using the File > New > New Module… menu in Android Studio in your existing Android project, you can either create a new...
Read more >[Solved]-Android module not open in flutter project-Flutter
<module type="JAVA_MODULE" version="4"> <component name="FacetManager"> <facet type="android" name="Android"> <configuration> <option ...
Read more >New Module button not showing Dialog [162565516]
AS: 4.2 Canary 7; Kotlin plugin: 1.3.72-release-Studio4.1-5; Android Gradle Plugin: 4.2.0-alpha07; Gradle: 6.5; NDK: from local.properties: (not specified), ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.
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 !