Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Running emulator without Android Studio in Windows With Flutter

Android Emulator Setup without Android Studio Windows with Flutter

First Download the Android SDK Commandline Tool only.

https://developer.android.com/studio/

Goto Download Options

Find Commandline tools only Section

Download Windows Platform

After downloading Extract the file into the Directory you want it to be installed

Next goto the tools/bin then execute this commands:

sdkmanager --update
sdkmanager emulator
sdkmanager system-images;android-25;google_apis;x86
sdkmanager extras;android;m2repository
sdkmanager --license
sdkmanager "build-tools;28.0.3" // latest build-tool
sdkmanager platforms;androind-28
sdkmanager platform-tools

create the repositories.cfg file in C:\Users<Username>.android

Setting the EvironmentVariables

JAVA_OPTS=-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee
ANDROID_SDK_ROOT = C:\Users\<Username>\.android\avd
Path = D:\android\tools\bin;D:\android\emulator

Enable the Windows Hypervisor Platform accelerator

Open windows feature
Check the Windows Hypervisor Platform and the reboot 

Checking list of device

avdmanager list device

Creating the AVD

avdmanager create avd -n <name of avd> --device <type of device> -k <system image>
avdmanager create avd -n nexus5x --device "Nexus 5X" -k system-images;android-25;google_apis;x86

Running the Device

emulator <name of the avd>
emulator @nexus5x

Removing AVD

avdmanager delete avd -n <name of avd>
avdmanager delete avd -n nexus5x

With Flutter

Flutter Config

flutter config --android-sdk /path/to/android/sdk
flutter doctor --android-licenses

Running Emulator with Flutter

flutter emulators --launch <emulator name or index>

Wipe Cache Data in AVD under in C:\Users<Username>.android<avd>\config.ini

fastboot.forceColdBoot=yes

JDK 12

curl https://repo1.maven.org/maven2/javax/activation/activation/1.1.1/activation-1.1.1.jar -O jaxb/activation.jar
curl https://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.4.0-b180830.0438/jaxb-impl-2.4.0-b180830.0438.jar -O jaxb/jaxb-impl.jar
curl https://repo1.maven.org/maven2/org/glassfish/jaxb/jaxb-xjc/2.3.2/jaxb-xjc-2.3.2.jar -O jaxb/jaxb-xjc.jar
curl https://repo1.maven.org/maven2/org/glassfish/jaxb/jaxb-core/2.3.0.1/jaxb-core-2.3.0.1.jar -O jaxb/jaxb-core.jar
curl https://repo1.maven.org/maven2/org/glassfish/jaxb/jaxb-jxc/2.3.2/jaxb-jxc-2.3.2.jar -O jaxb/jaxb-jxc.jar
curl https://repo1.maven.org/maven2/javax/xml/bind/jaxb-api/2.3.1/jaxb-api-2.3.1.jar -O jaxb/jaxb-api.jar
curl https://repo1.maven.org/maven2/com/sun/istack/istack-commons-runtime/3.0.8/istack-commons-runtime-3.0.8.jar -O jaxb_lib/istack-commons-runtime.jar

Config file sdkmanager.bat & avdmanager.bat

Above @rem Execute avdmanager and @rem Execute sdkmanager

set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb\jaxb-api.jar
set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb\jaxb-core.jar
set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb\jaxb-impl.jar
set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb\jaxb-jxc.jar
set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb\jaxb-xjc.jar
set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb\activation.jar
set CLASSPATH=%CLASSPATH%;%APP_HOME%\jaxb\istack-commons-runtime.jar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.