Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start android emulator without starting Android Studio for flutter applications

Is it possible to start emulator in such a way flutter doctor detects it and flutter run should able to deploy to flutter code ?

I tried emulator -avd *image name* but flutter doctor fails to detect running emulator and flutter run does not deploys code on emulator.

like image 242
ashishWaghmare Avatar asked Jan 29 '23 11:01

ashishWaghmare


1 Answers

In notepad type the following and save it as "file_name.bat" and run it:

SET builddir=%~dp0
SET EX="C:\Users\user_name\AppData\Local\Android\Sdk\emulator\emulator.exe"
CALL %EX%  -avd emu_name -partition-size 512 -feature WindowsHypervisorPlatform
pause

emu_name is the name of your emulator.

like image 118
Pratik Adhikari Avatar answered Jan 31 '23 20:01

Pratik Adhikari