No template or file for new android studio flutter project - flutter

I have just started learning flutter and mobile app development
When I click create new flutter project it does not show any template and shows this -create new flutter project wizard
My flutter doctor -v output is -picture of the output
I'm not sure how to create a new flutter project properly and start the actual development of app.
Please help, thank you

Go to the flutter app and then create the project. This will give you the default project to start.
First download Flutter SDK for windows from here.
Then extract the zip in C:\src\flutter which would look like this:
Go to the New project-->Flutter App in android studio and enter the SDK path:
Then click next and then finish:
Go to the android studio setting and install android sdk command-line tools:
Also after doing these steps go to C:\src\flutter and run flutter_console.bat file in which enter these commands:
flutter doctor to see everything is working correctly or not.
flutter doctor --android-licenses this command will check if all licenses are excepted or not. If not you should accept all.

Related

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.

How to deploy flutter example for the web?

https://pub.dev/packages/flutter_tex/example (want to run this code for Flutter Web)
Goal: Deploy flutter example on a simple web page for checking latex code output
Expected result: Simple web page where you type Latex on the left and it shows you rendered equations on the right
My experience: 1 day
Current installation: Flutter, Dart, Android Studio, Dart -> Able to "create new Flutter project"
What I have tried: Opened a new flutter project - pasted code in main.dart - did not work (no device device - need virtual device for web deployment?)
In order to run your Flutter project on the web, you must ensure that you have the latest version of Flutter (currently I am running v2.0.2). If you don't have the latest version, just run flutter upgrade in the terminal.
Secondly, you need to check whether the package that you are using also supports the web platform. You can check it by going into the "Scores" tab in the package.
Then, all you have to do is to run the command:
flutter run -d chrome
This will launch the flutter app in the Google chrome browser.

How to make a Flutter Web App run in an Android Emulator

I have created a web app using Flutter and it is running fine.
I wanted to create a mobile app out of it with as little modification to the code as possible and wanted to run it in an Android Emulator, so I installed Android Studio and then a device in ADV Manager. The code did not show any errors but Android Studio is not able to locate the newly installed device. Am I missing something?
The question could also be reframed as: how to convert a Flutter web app into a mobile app.
Source of this answer is :here
Can you try to run the below command in terminal:
flutter devices
Does it show something like this?
Android SDK built for x86 (mobile)
If not, then try to run the following commands:
flutter config --android-sdk <path to android sdk>
flutter config --android-studio-dir <path to android studio>
Replace with the actual path to the SDK in your machine.
And then restart your Android Studio. You should see your virtual device listed under Flutter Device Selection.
Please note, to find the path to Android SDK, you can go to Preferences as shown in this image

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.