DustyDrop
DustyDrop

Reputation: 13

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.

Upvotes: 1

Views: 1010

Answers (1)

Akash Mahapatra
Akash Mahapatra

Reputation: 3248

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:

  1. flutter config --android-sdk <path to android sdk>
  2. 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
image

Upvotes: 1

Related Questions