Flutter run stuck at Installing build\app\outputs\apk\app.apk - flutter

Edit: It seemed to work after restarting everything, no other solution really noticed.
I couldn't find useful solutions on following thread:
Flutter stuck at Installing build\app\outputs\apk\app.apk
It's not the same issue, mine doesn't finish installing.
I have an Honor 7 as a connected device and using Visual Studio Code.
When running 'flutter run' following happens:
Launching lib/main.dart on PLK L01 in debug mode...
Initializing gradle... 1,1s
Resolving dependencies... 3,3s
Gradle task 'assembleDebug'...
Gradle task 'assembleDebug'... Done 15,6s
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk... -
Once last step is loading, my device asks to accept app installation. Once accepted it provides 2 options after installation:
Open App
Finish ( Meaning = return to home screen )
Either way the last step doesn't finish. 'flutter clean' makes no difference. Hot reload not working. Did anyone else encounter this issue ?
'flutter doctor -v' output:
[√] Flutter (Channel stable, v1.0.0, on Microsoft Windows [Version 10.0.17134.590], locale de-DE)
• Flutter version 1.0.0 at F:\flutter
• Framework revision 5391447fae (3 months ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at C:\Users\user\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-P, build-tools 27.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 2.2)
• Android Studio at E:\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_76-release-b03)
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[!] IntelliJ IDEA Community Edition (version 2017.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.2
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
[!] IntelliJ IDEA Ultimate Edition (version 2017.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2017.3.2
X Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 173.4127.31
• For information about installing plugins, see
https://flutter.io/intellij-setup/#installing-the-plugins
[√] VS Code, 32-bit edition (version 1.12.2)
• VS Code at C:\Program Files (x86)\Microsoft VS Code
• Flutter extension version 2.22.3
[√] Connected device (1 available)
• PLK L01 • H8WDU15207300112 • android-arm64 • Android 6.0 (API 23)
! Doctor found issues in 2 categories.

Solutions is quite simple
For flutter hot reload problems that may be happening with your project,
It is a problem with your device, and not flutter or Android Studio
This happens when your logcat hangs up.
You might want to increase your buffer size.
To do this, go into your device or emulator:
Settings > Developer options (Ensure they are turned on),
Change the buffer size to a higher number.
Then run flutter run -v again

Other user may get solution in this url.
In my case the app uninstalled manually so it is not showing in launcher .
and got solution in this
post.
which is
Go to Settings.
Go to Apps.
Select your app. (here, you can verifythat your app is not uninstalled properly).
Open the overflow menu (which are 3 dots)on the top right and select Uninstall for all users.

In my case the problem was that I forgot to change MainActivity.kt package name after I modified it.
package com.WrongCompanyName.WrongProjectName
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
class MainActivity: FlutterActivity() {
override fun configureFlutterEngine(#NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}

Make sure your MainActivity.java is in the right location, it has a MainActivity class declaration, and that the package matches your package id.

Edit: You can enter this in the terminal
flutter run
And then r to hot reload. You might have to Ctrl+C and n first
It's slower than F5, but still works!
My original answer:
I got around this problem by typing the command in the Terminal
flutter run -d <deviceId>
for my LG phone, it was
flutter run -d LGUS998d7315d51

My solution was to check the package name (iOS is applicationId) of my Android App.
I had recently changed the name of my package from the default "com.example.app_name" to something more custom. However, I had forgotten to change all of the locations.
I believe the most important locations are as follows:
Mac / iOS
build.gradle -- search for "applicationId"
Android
[app_name]\android\app\src\debug\AndroidManifest.xml
[app_name]\android\app\src\main\AndroidManifest.xml
[app_name]\android\app\src\profile\AndroidManifest.xml
Just search for package="

Open android\app\build.gradle and set a different application id to the app.
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.othervalue.sbmicalc"
}
Then remove previous build:
flutter clean
and run again:
flutter run

I have been struggling with this off and on for a year, here is what I just noticed that makes it work or not work on my system.
I discovered tonight that if I have my virus protection running my emulator stalls in the
" ---> Built build\app\outputs\apk\debug\app-debug.apk.
and I just get a white screen. I turn off the virus protection and it works fine in debug mode.
If its on I have to keep going to the terminal and doing: " flutter run " to see any changes I have made.
Maybe this will help someone.

I faced this problem and found a solution.(I use emulator)
It seems this is just an emulator problem.
AVD Manager -> Actions -> Wipe Data
Maybe you need to do flutter clean, but the problem will solve.

In my case, it was not uninstalled the flutter app properly from mobile phone because my mobile has normal space and private space...so when I uninstall the app from normal space it was uninstalled but not uninstall from private space. then after removing the app from private space and run
flutter clean
and run the again it's work fine!
flutter run

I have also faced the same issue when I have changed targetSdkVersion to static values (33) in my case
android/app/build.gradle
targetSdkVersion flutter.targetSdkVersion to targetSdkVersion 33
So, By un-doing changes and by adding constant in local.properties worked for me
android/app/build.gradle
targetSdkVersion flutter.targetSdkVersion
and
android/local.properties
flutter.versionName=1.0.0
flutter.versionCode=1
flutter.targetSdkVersion=33

If you see your app installed like this -> just click it to open. It worked for me

Related

Update Gradle in Flutter project

I have this project in Flutter, but I haven't been able to build an apk for a couple of weeks, because of the Gradle version. I've tried everything, but Flutter always returns the error below:
I already install every update I found, even though, it shows that the Gradle version is 4.10.2.
flutter build apk
...
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\israel.gomes\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\audioplayers-0.17.4\android\build.gradle' line: 25
* What went wrong:
A problem occurred evaluating root project 'audioplayers'.
> Failed to apply plugin [id 'kotlin-android']
> The current Gradle version 4.10.2 is not compatible with the Kotlin Gradle plugin. Please use Gradle 5.3 or newer, or the previous version of the Kotlin plugin.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
The plugin audioplayers could not be built due to the issue above.
Here some information about the project status and environment----------------------
Already changed gradle-wrapper.properties (Current file):
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip
android/build.gradle(Current file):
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
.
.
.
gradle --version
------------------------------------------------------------
Gradle 5.6.2
------------------------------------------------------------
Build time: 2019-09-05 16:13:54 UTC
Revision: 55a5e53d855db8fc7b0e494412fc624051a8e781
Kotlin: 1.3.41
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.14 compiled on March 12 2019
JVM: 1.8.0_261 (Oracle Corporation 25.261-b12)
OS: Windows 10 10.0 amd64
flutter doctor -v
[√] Flutter (Channel dev, 2.1.0-12.1.pre, on Microsoft Windows [versão 10.0.19042.867], locale pt-BR)
• Flutter version 2.1.0-12.1.pre at C:\Flutter
• Framework revision 8264cb3e8a (3 weeks ago), 2021-03-10 12:37:57 -0800
• Engine revision 711ab3fda0
• Dart version 2.13.0 (build 2.13.0-116.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\israel.gomes\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = C:\Users\israel.gomes\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] IntelliJ IDEA Community Edition (version 2020.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3
• Flutter plugin version 55.0.4
• Dart plugin version 203.7759
[√] VS Code (version 1.54.3)
• VS Code at C:\Users\israel.gomes\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.20.0
[√] Connected device (3 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.114
• Edge (web) • edge • web-javascript • Microsoft Edge 87.0.664.75
• No issues found!
Here is how I upgraded gradle in my older Flutter project:
Create a new temp project with the latest version of Flutter. You'll use this to see what version of gradle Flutter is using nowadays.
In the temp project open android/build.gradle check the classpath version of gradle being used and update that in your old Flutter project. For me today it looks like this:
classpath 'com.android.tools.build:gradle:4.1.0'
In the temp project open android/gradle/wrapper/gradle-wrapper.properties and check the distributionUrl. Update your old project to use the same one. For me today it looks like this:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
Rerun your app. It has to download the new version of gradle to the android/.gradle directory so the first time might take a while.
The easiest way (I do so as Android Dev):
Right click android folder in root folder
Flutter
Open in Android Studio
Wait for it to load completely
It'll ask you "Would you like to upgrade gradle?|"
Click Yes
flutter clean
android/gradle/wrapper/gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
android/build.gradle:
classpath "com.android.tools.build:gradle:7.0.1"
in android/gradle.properties, add this:
org.gradle.java.home=C:\\Program Files\\Android\\Android Studio\\jre
It appears as if audioplayers has an incompatible gradle version with your project.
Try upgrading audioplayers to the newest version, although this may not fix the issue, as the last comment in this thread was less than 24 hours ago.
audioplayers: ^0.18.3
An update for 2022, Android Studio Dolphin. The other answers gave me a start, but are no longer up-to-date.
Open the main flutter project in Android Studio
Right click on the [android] module. Choose "Flutter". Choose Open Android module in Android Studio
I opened in a new window, but this probably isn't required.
As it says in the text here , choose on the menu (you must be in the "Android" project)
File
Project Structure
Project
Click the Android Gradle Plugin Version dropdown and choose the latest version (or whatever one you want to update to)
Click the Gradle Version dropdown and choose the latest version (or whatever one you want to update to)
Give time for your Gradle to sync (it might have to download quite a lot, so be patient)
Now you should be able to close the Android project window, and go back to the flutter project
Try renaming the android/ folder in your project. Then run flutter create . in the directory. This should recreate your android directory. Try your build again and see if it fixed your problem.
Upgrade gradle in a Flutter project.
Open the file gradle-wrapper.properties located at {yourProjectName}/android/gradle/wrapper/gradle-wrapper.properties and replace the distributionUrl by changing the gradle version.
For example if you want to upgrade gradle from version 5.1.1 to 6.1.1, change the Url from https\://services.gradle.org/distributions/gradle-5.1.1-all.zip to https\://services.gradle.org/distributions/gradle-6.1.1-all.zip and rebuild your app.
Fast way of doing it:
Open AndroidManifest.xml (andriod/app/src/main/AndroidManifest.xml)
Click "Open for Editing in Android Studio"
In late 2022, Android Studio can fix that and upgrade Gradle:
Open the main flutter project in Android Studio
Right click on the android module. Choose "Flutter". Choose Open Android module in Android Studio, I opened in a new window
Then, in the lower right corner, Android Studio presents a message suggesting to upgrade Gradle. Follow this suggestion!
After that, you can close the Android project window
Based on Nick Fortescue answer
I was getting this issue:
FAILURE: Build failed with an exception.
Where:
Build file '/home/marcelo-cesar/Desktop/Overseasconnection-player-teams/android/app/build.gradle' line: 47
What went wrong:
A problem occurred evaluating project ':app'.
Could not find method minSdkVersion() for arguments [19, null] on DefaultConfig$AgpDecorated_Decorated{name=main, dimension=null, minSdkVersion=null, targetSdkVersion=null, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptSupportModeBlasEnabled=null, renderscriptNdkModeEnabled=null, versionCode=null, versionName=null, applicationId=com.ls.overseasagent, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=[], buildConfigFields={}, resValues={}, proguardFiles=[], consumerProguardFiles=[], manifestPlaceholders={applicationName=android.app.Application}, wearAppUnbundled=null} of type com.android.build.gradle.internal.dsl.DefaultConfig$AgpDecorated.
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 3s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I solved it by making these changes:
In android/build.gradle
update these lines with these following:
ext.kotlin_version = '1.7.10'
classpath 'com.android.tools.build:gradle:7.3.1'
In android/app/build.gradle
update with this value:
compileSdkVersion 33
defaultConfig {
…
minSdkVersion 21
targetSdkVersion 31
}
In android/gradle/wrapper/gradle-wrapper.properties
update distribution line with this:
distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip

I am unable to build my flutter web project

When trying to run flutter build web i get "build web" is not currently supported.
I had previous errors where i was stuck with Dart 2.5.0-dev.4.0.flutter-be66176534 and required 2.5.0 or higher, this has now been solved but i am unable to build my project.
flutter doctor -v
[√] Flutter (Channel stable, v1.9.1+hotfix.2, on Microsoft Windows [Version 10.0.18932.1000], locale en-GB)
• Flutter version 1.9.1+hotfix.2 at C:\src\flutter
• Framework revision 2d2a1ffec9 (8 days ago), 2019-09-06 18:39:49 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at C:\Users\germa\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[!] Android Studio (version 3.4)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[√] VS Code (version 1.38.1)
• VS Code at C:\Users\germa\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.4.1
I have tried
re-installing dart
re-installing flutter
re-installing Visual Studio code
copy file contents to a new web project (same error)
I couldn't find any information on what this is caused by and how to resolve it online
What can i do to resolve this error?
Please once do configure like below
flutter channel stable
flutter upgrade
flutter config --enable-web
cd into project directory
flutter create .
flutter run -d chrome
So currently you are at stable channel . You have to switch to the beta channel as flutter web is not at a stable channel right now. In order to make it working run the following commands in the terminal.
flutter channel beta
flutter upgrade
flutter config --enable-web.
After that restart your IDE and build the web app.
I was facing problem in flutter stable 2.0.2, by running
flutter create .
it was not creating web module, after upgrading it has started working. I guess my flutter web sdk had some issue so by fresh upgrade it got fixed.
if your are facing the problem
Ambiguous organization in existing files: {package_name1, package_name2}. The --org command line argument must be specified to recreate project.
you can use this command
flutter create --org package_name1 .
And
flutter run -d chrome
Just check whether you have used any plugins in pubspecs.yaml that is nonweb supportive.
you have to add web support to an existing app:
flutter create .
then try to
flutter build web

Flutter fresh installation flutter run stuck

I am new to flutter i have fresh installtion.
All as in docs.
As after fresh installation i was fine worked but when i want to work on another day flutter run i stuck.... I do not know why. I only make boilerplate app. I xcode when i build app is opening in simulator but stating as flutter run not working. I even try to wait 20 min with this flutter run but still stuck
flutter doctor -v
[✓] Flutter (Channel master, v1.6.4-pre.14, on Mac OS X 10.14.5 18F132, locale
pl-PL)
• Flutter version 1.6.4-pre.14 at /Users/db/Desktop/Mobile/flutter
• Framework revision 81c38b22cb (32 hours ago), 2019-05-24 22:51:02 -0400
• Engine revision 8dc3a4cde2
• Dart version 2.3.2 (build 2.3.2-dev.0.0 e3edfd36b2)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/db/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling
support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• CocoaPods version 1.7.0
[✓] iOS tools - develop for iOS devices
• ios-deploy 1.9.4
[✓] Android Studio (version 3.4)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build
1.8.0_152-release-1343-b01)
[✓] Connected device (1 available)
• iPhone 8 • F35EFD3E-C637-427A-8405-30EDF202939A • ios •
com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
• No issues found!
flutter run -v stuck at this stage.
+file:///Users/db/Desktop/Mobile/flutter/packages/flutter/lib/widgets.d
art
[ ] -> +file:///Users/db/Desktop/Flutter/iamsmart/lib/main.dart
[ ] -> 35191e22-84d6-4fab-abef-178ae9e4c665 build/app.dill 0
[ +319 ms] Building bundle
[ ] Writing asset files to build/flutter_assets
[ +55 ms] Wrote build/flutter_assets
[ +12 ms] Using legacy Xcode build system.
[ +27 ms] executing: [/Users/db/Desktop/Flutter/iamsmart/ios/]
/usr/bin/xcodebuild -list
Run this command
flutter clean
And then again
flutter run
Try to upgrade your flutter version to v 1.7.8 by running this
command this needs internet connection
flutter upgrade
Try this command
flutter clean
Change your flutter channel to stable
flutter channel stable
Check your internet connection because sometimes it prevents me from
running my app
Try to switch your flutter channel master to stable channel. After switching the channels you should call flutter upgrade to download the Flutter SDK and dependent packages.
Do this steps in the terminal
flutter channel stable
flutter upgrade
try to run your code after this steps.
Update to 1.9.1-hotfix4 fixed the problem
Your flutter doctor isn't showing any error as you had shared the commands.I think to share the run command terminal so that we can find out the stack of flowing of commands.
If you are getting error to build flutter project then you should update the Android Studio or VS Code Editor.
You can refer here:
Android studio-https://developer.android.com/studio
VS Code-https://code.visualstudio.com/Download
If you are able to create flutter project but doesn't getting run command then you need to update flutter and dart.
You can refer here:
Flutter-https://flutter.dev/docs/development/tools/sdk/releases
Dart-https://dart.dev/get-dart
If still you are suffering from error then you need to share some more Pics.
Probably something's gone wrong after you changed some files in of flutter ide. Also it does after updates crashed.
So the thing you should do is firstly backup your projects if it indeed. After backup remove the ide and be sure uninstalling complate succesful. Restart your computer and install all decencies again. Because sometimes upgrading does not works well to get good result.
P.S : Dont forget using flutter doctor for checking if any problem comes out.

Flutter no devices detected even the simulator is on

I am a totally rookie in flutter project development and recently i have run into a tech issue that the flutter can not detect the android simulator even the simulator is on ;
The issue as below:
enter image description here
Flutter console:
F:\Developer\demo>flutter doctor -v
[√] Flutter (Channel beta, v0.7.3, on Microsoft Windows [Version 10.0.17134.228], locale zh-CN)
• Flutter version 0.7.3 at D:\flutter_windows_v0.7.3-beta\flutter
• Framework revision 3b309bda07 (3 months ago), 2018-08-28 12:39:24 -0700
• Engine revision af42b6dc95
• Dart version 2.1.0-dev.1.0.flutter-ccb16f7282
[√] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at D:\Android\android-sdk-windows
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = D:\Android\android-sdk-windows
• Java binary at: D:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
• All Android licenses accepted.
[√] Android Studio (version 3.1)
• Android Studio at D:\Program Files\Android\Android Studio
• Flutter plugin version 28.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[!] Connected devices
! No devices available
! Doctor found issues in 1 category.
So, is there anything i am going wrong?
First check if your devices were listed:
In terminal, run the flutter devices command to verify that Flutter
recognizes your connected Android device.
You can follow the installation guide provided in the Flutter documentation:
Windows set-up
Install Android
Studio
Download and install Android Studio.
Start Android Studio, and go through the ‘Android Studio Setup Wizard’. This installs the latest Android SDK, Android SDK
Command-line Tools, and Android SDK Build-Tools, which are required by
Flutter when developing for Android.
Set up your Android
device
To prepare to run and test your Flutter app on an Android device, you
need an Android device running Android 4.1 (API level 16) or higher.
Enable Developer options and USB debugging on your device. Detailed instructions are available in the Android
documentation.
Windows-only: Install the Google USB Driver.
Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your device.
n the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device. By default, Flutter
uses the version of the Android SDK where your adb tool is based. If
you want Flutter to use a different installation of the Android SDK,
you must set the ANDROID_SDK_ROOT environment variable to that
installation directory.
Set up the Android
emulator
To prepare to run and test your Flutter app on the Android emulator,
follow these steps:
Enable VM
acceleration
on your machine.
Launch Android Studio, click the AVD Manager icon, and select Create
Virtual Device…
In older versions of Android Studio, you should instead launch Android Studio > Tools > Android > AVD Manager and select Create Virtual Device…. (The Android submenu is only present when
inside an Android project.)
If you do not have a project open, you can choose Configure > AVD Manager and select Create Virtual Device…
Choose a device definition and select Next.
Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is
recommended.
Under Emulated Performance, select Hardware - GLES 2.0 to enable hardware
acceleration.
Verify the AVD configuration is correct, and select Finish.
For details on the above steps, see Managing AVDs.
In Android Virtual Device Manager, click Run in the toolbar. The emulator starts up and displays the default canvas for your
selected OS version and device.
Try to check this SO post as well. It is related to your question.

Flutter with VSCode shows not installed even though its installs

I just getting with flutter. I have installed it along created a project successfully.
But when I try to run it fails.
Below is the output with flutter doctor -v
PS C:\android-app\flutter-app\flutter_first_app> flutter doctor -v
[√] Flutter (Channel master, v0.5.5-pre.9, on Microsoft Windows [Version 10.0.16299.461], locale en-US)
• Flutter version 0.5.5-pre.9 at C:\android-app\flutter
• Framework revision 587569337e (7 hours ago), 2018-06-13 00:02:21 +0200
• Engine revision a328531402
• Dart version 2.0.0-dev.60.0.flutter-a5e41681e5
[!] Android toolchain - develop for Android devices (Android SDK 28.0.0)
• Android SDK at C:\Users\Sreyah Admin\AppData\Local\Android\Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.0
• ANDROID_HOME = C:\Users\Sreyah Admin\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
X Android license status unknown.
[√] Android Studio (version 3.1)
• Android Studio at C:\Program Files\Android\Android Studio
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b02)
[!] VS Code, 64-bit edition (version 1.24.0)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension not installed; install from
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected devices (1 available)
• XT1706 • HKE63YLL • android-arm • Android 6.0 (API 23)
I have installed the Flutter extension.
I tried uninstall and install a couple of time, but still the same result.
I think there are two issues here:
Doctor says you don't have the extension
Your project doesn't run
1 Doctor says you don't have the extension
This is a bug I've just fixed. Seems like VS Code may have started lower-casing the extension folders recently, and our test for them was case sensitive. The fix is in master but hasn't made the beta channel (as of 22nd June 2018).
Note: This check doesn't affect anything else, as long as the extension is installed this is just an issue with the doctor output.
2. Your project doesn't run
This is probably not related to the doctor output if you can see the extension in VS Code. You haven't included any info on the reason your app doesn't run (does it give an error? what do you see?) so it's hard to guess; but if you can provide that info I can take a stab.
If you haven't already, it's also worth running the project from the command line with flutter run to see if it works there, to see whether the issue is specific to VS Code or something else with your setup.
If if works from the command line then I would recommend opening an issue on GitHub for the Dart-Code repo with more information and we can track it down from there.
Open your VS Code if you have it installed, if not you can still install it from the link. Flutter internally use Dart language to build a mobile app. So you need to install this extension
Then open this link "https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter" to install this extension.
After the installation run your flutter doctor -v to confirm.