2

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--

enter image description here

flutter doctor -v ----

enter image description here

0

4 Answers 4

3

Try the followings.

  1. run the flutter doctor --android-licenses and accept licenses. (it happened to me too)
  2. Install the flutter & DART plugin in Android Studio.
  3. Then run the project again
  4. Add the flutter bin dir to your path
Sign up to request clarification or add additional context in comments.

Comments

1

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.

Comments

0

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.

Comments

0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.