Android Studio Problem with creating a new flutter project - flutter

Can I know why my error popup font is breaking?
When I Run the Flutter Doctor
this appears, and I understand that I didn't add the directory to the Envir-Path.
But First I want to solve the error notation.
My envir. is Windows11 and using the latest version of Android Studio and also Installed the flutter plugin
also installed Git.

I had the same problem. I uninstalled git and reinstalled it from https://git-scm.com/downloads. However, it still did not fix the problem. Then, I right clicked on Android Studio and clicked on Run as Administrator. Apparently, it fixed my problem.
Also, run flutter doctor in your terminal as it says and install anything you have not installed yet.

Related

Avdmanager not found

I am trying to run my first flutter app emulator, which is having complications at various level, I have tried too much but could not make through it, here is what I have tried.
On trying to click on Create Android Emulator in Visual studio code, the dart extension shows following:-
link to img
I don't know why it is happening as on checking, it is present:-
link to img.
I would like to point out here that I am not able to understand what I have to put in flutter --android-sdk {path}.
Also on running flutter doctor, it shows the absence of visual studio despite the fact that I have it in place(that is why I could take the first screenshot). One thing I would like to point out here is that my vscode is in C drive while my flutter-test folder(which contains everything related to flutter) is in D drive:
link to img
Please help so that I can further follow along to create an android app. Also ask if any further information is needed.
You need to know that having Android Studio Installed will solve the majority of issues caused.
STEPS:
Clean out all your Flutter, Dart and Android installation
Download Android Studio from official website (the latest version is Android Studio Electric Eel)
After the installation of Android Studio, open it and add the flutter and dart plugins
Now download flutter and follow the installation steps.
After adding flutter, go to Edit the system environment on your PC and add JAVA_HOME variable with C:\Program Files\Android\Android Studio\jbr. Noticed I used jbr not jre because with Android Studio Electric Eel jbr replaced jre.
Afterward, open new terminal and run flutter doctor --android-licenses
WHAT DID WE DO ABOVE?
We cleaned our installation and downloaded the latest Flutter version which has Dart downloaded automatically. Next, we Installed Android Studio Electric Eel which has Java and Android settings in-build. This way we solve 99% of the problems here: The last thing is to create an Emulator using Android Studio not VSC.
For future help, please comment below. Bye

Flutter Doctor shows VSCode not installed, even though its installed in my computer

I am installing flutter for the first time in my laptop. When I ran flutter doctor it shows that VSCode is not installed, even though I have been using it for a while now.
I already have installed VSCode in my laptop but flutter doctor shows that it isn't installed. Ig its got something to do with the path. I'm not rly sure, kindly help....
As you know, you can make desktop applications with Flutter as well. Therefore Flutter need Visual Studio and "Desktop Development with C++" tool. Flutter doctor terminal says which version you need to install as well.
The warning message means you didn't installed Visual Studio (not visual-studio code).
You can download and install visual-studio to build windows app. Make sure to install Desktop development with C++.
You can follow this to build Windows app

Dart_LoadScriptFromKernel: The binary program does not contain 'main'. when I run flutterfire configure

I've been looking for a solution to this problem and I can't find it anywhere.
I'm trying to install Firebase and every time I do the flutterfire configure command it pops up Dart_LoadScriptFromKernel: The binary program does not contain 'main'.
I've already done the flutter Clear command, flutter upgrade, installed and uninstalled the dart and flutter plugins. flutter doctor is ok.
I moved the project folder into other place.
Both in Android Studio and in VSCode I can run the app normally.
Thanks for help!

error when using flutter with Android Studio

If you use flutter in android studio, all the Widget ls colored with yellow(some color) and some times they recommend commands. Mine worked too, but after resetting flutter sdk, it doesn't work. At first, I thought sdk was wrong, but there's nothing wrong with running code.
For example, if you make code like this,
'build' and 'ThemeData' are colored with yellow.
And if you type 'Colors.' then it recommends some colors which you can use.
However, in my android studio.. it does not works.
I also check my preferences but I can't find the reason.
Try restarting Android Studio and your computer
Also, check if dart and flutter SDKs are properly configured for the project.
If all this seems good, check if you have accidentally uninstalled Flutter or Dart plugin in Android Studio, if yes install again and restart Android Studio.
If they are already installed try reinstalling them and restart Android Studio.
I hope this fixes your problem.

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.