Flutter Windows option disabled in IntelliJ IDEA - flutter

Windows option is disabled while creating a new Flutter project in IntelliJ IDEA. I've upgraded my Flutter to Flutter 2 stable channel but getting Windows option disabled whereas I've also installed Visual Studio 2019 in my PC.
Here's my Flutter doctor results

Run the following commands
flutter config --enable-windows-desktop
flutter channel dev
flutter upgrade
flutter config --enable-windows-uwp-desktop
flutter doctor
Then as per the instruction of the above command, you may have to install required tools like Visual Studio...
Finally in IntelliJ
New Project -> Select Flutter -> Select SDK Location, Click Next
(Now if you still see Windows is disabled)
Press Back & Then press next... Now, I am seeing it can be enabled.
Even after that if you are not seeing, allow the project to finish without selecting the windows (or try to select web)
Then provide the following command on the project root directory
flutter create --platforms=windows

Related

Build option for windows is not showing in android studio

I am in the latest stable release for flutter desktop and have installed Visual Studio 2022 but still the option for "Windows" is not showing.
Do i still need to run the below command in stable release?
flutter config --enable-<windows>-desktop
You need to try its working fine
flutter config --enable-macos-desktop
flutter config --enable-linux-desktop
flutter config --enable-windows-desktop
flutter config --enable-windows-uwp-desktop
Sometimes it needs to press the previous and Then the next button.

Flutter and Dart plugins shown as not installed using flutter doctor

I am working normally with Android Studio developing Flutter projects.
But now, after executing the command flutter doctor -v the output is as follows:
The only issue shown is that Flutter and Dart plugins are not installed, but they are:
Is that a bug only or should I change something in Android Studio?
I am on flutter channel stable, on dev channel the issue is not shown, everything is ok.
You need to setup the path to the Flutter SDK through settings. For detailed steps, you can refer the link attached.
The one that you carried out is enabling the Flutter IDE features.
Installing the plugin will enable the Flutter Specific features in the
Android Studio.
To make the Android studio to support Flutter development you need to set the path to the Flutter SDK in
Settings -> "Languages and Frameworks" -> Flutter -> "Set the path
to Flutter SDK" -> Click Apply.
Restart the Android Studio to make the changes to reflect. After completing the setup, you can run the flutter doctor to confirm that everything is fine.

Flutter doesn't compile project after restart

My computer restarted for no reason and now all settings in flutter running in vs code have changed. During restart, I got an option to verify the author or something. I believe to hit trust but after that, I can't compile my project anymore plus the default behavior of the mouse buttons has changed. Right-click now shows, change all occurrences instead of default options. My phone is connected but it doesn't show up in the emulator/phone section below.
The same project runs fine in android studio
1st run flutter doctor to check if there any problem with install.
try to clean the project using flutter clean and rebuil/ run again.
Also you can run from terminal,
you can just type on terminal flutter run and it show devices then select one.
For emulators type flutter emulators , it will show your emulators,
to run on emulators flutter emulators --launch deviceName.
here the short form.
flutter clean
flutter pub get
flutter run
It worked after reinstalling all my extensions, primarily dart and flutter a couple of times. Thank you #amsakanna

Grandlew bat file not found in windows 10

I have installed flutter and android studio. Followed some resources I have added path.(In windows)
But everytime I run the first project it is giving errors
like. Grandlew bat file not found.
sometimes : exception: exit with 1
Flutter doctor is always giving licenses unknown. I tried number of solutions in the YouTube and from here..but still getting same thing..
My dreams are going to stop in the first step.
you need to install flutter and dart plugin in your android studio/VS code.
to install a plugin in Android Studio follow these steps
Launch Android Studio application
Choose File -> Settings (For Mac Preference )
Search for Flutter then for dart(But dart will be installed automatically with flutter)
I just noticed you don't have Android SDK either, for that, you should go to your android studio and on the top right corner click on the SDK icon, and then install 28/29 version of android SDK hopefully it will solve your problem
alternatively, you can download SDK from here as well

unable to run flutter app in vs code with real device

i am trying to run flutter app in visual studio code by pressing F5,
connecting a real device, but unable to run the app
my android sdk path--
C:\src\flutter\flutter
my flutter app path--
D:\flutter\flut\flut
error message--
flutter doctor -v ----
Try the followings.
run the flutter doctor --android-licenses and accept licenses.
(it happened to me too)
Install the flutter & DART plugin in Android Studio.
Then run the project again
Add the flutter bin dir to your path
First you have to accept the licenses for Android SDK. Write the following commands in your terminal.
flutter doctor --android-licenses
After adding above command you have to accept all the list of licenses one by one to get ahead.
In your case, you have not installed dart and flutter plugin. So, close your project and go to "Welcome Screen" of IDE where you will see a "Configure" button. click on it and select "Plugins".
Now, search for Flutter and Dart and install both of them. After installing both restart your IDE to apply new changes.
Now, you're Done with the setup. Now, you can run your project in real device or emulator by configuring them.
you need to accept the android licence, to do so,
run the command
flutter doctor --android-licenses
in your terminal, and press yes when prompted in the terminal.
The flutter and dart plugins are also not installed on your Android Studio, to include these, add dart and flutter plugins and restart your Android Studio.
And finally run the command flutter doctor in your terminal and check every thing is installed correctly.
Had that issue. Had to downgrade Java from 11 to 8. After that I have been able to accept the all the licenses. But in order to run the app - had to upgrade back Java 11. And also has to be sure that that JAVA_HOME path is JDK, but not JRE. But that that is the next thing.