# Debugging via an Android emulator

Android Studio creates includes an emulator by default. However, you can create emulators for other devices.

To create an Android emulator:

1.  Launch Android Studio. If you haven't installed it, `do that first</topics/android/installing_android_studio>`.
2.  Click the New Project button in the Welcome window.
3.  In the New Project window, click **Next** then click **Finish**.
4.  Android Studio will prepare the new new project. When it's done, click **Finish**.
5.  From the menubar, choose Tools \> Device Manager.
6.  Click **Create device**. The Virtual Device Configuration window appears.
7.  For the best debugging experience, in the device listbox, choose one of the devices that has an icon in the Play Store column then click **Next**.
8.  On the System Image page, the appropriate Android version should already be selected. If the **Next** button is not enabled, click the **Download** button to download the system image.
9.  Click the **Next** button.
10. On the Verify Configuration page, click **Finish**.
11. The emulator you created appears in the Device Manager pane in Android Studio. Click the Play button to start your new emulator for the first time so that it can be ready to go when you use it in Xojo.
12. You may now quit Android Studio and use the emulator in Xojo.

The first time you launch a Xojo app in an Android emulator you just created, it will take a minute or so to configure itself. After that, it launches and runs quite quickly.

<div class="note">

<div class="title">

Note

</div>

On macOS, the first time you run an Android emulator, macOS will display a dialog asking for permission to access system events. This happens because Xojo uses AppleScript behind the scenes to launch Android emulators.

</div>

<div class="tip">

<div class="title">

Tip

</div>

If you're going to be building several different apps for Android, the default amount of storage the emulator has might not be enough. When creating your emulator, on the Verify Configuration page, click **Show Advanced Settings** then scroll the configuration list until you see the *Internal Storage* field. It defaults to 2048 MB. Increasing this will make the emulator run faster.

</div>

<div class="note">

<div class="title">

Note

</div>

As Google changes Android Studio, these steps may be not be 100% correct.

</div>

<div class="seealso">

`Installing Android Studio</topics/android/installing_android_studio>`, `Running/Debugging your Android app on a device</topics/debugging/android/android_debugging_on_device>`, `Android QuickStart</getting_started/quickstarts/android_quickstart>`, `Android Tutorial</getting_started/tutorials/android_tutorial>`

</div>
