We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All
GuidesCoding and DebuggingRunning Your App on the EmulatorManaging the EmulatorCreating an Emulator

Creating an Emulator

When Internet access is available, follow the steps below to create an emulator. For offline environments, refer to the instructions in Deploying an Emulator Offline.

NOTE

On macOS, you may find in the activity monitor that the memory occupied by the emulator process exceeds the configured value. However, the Memory metric displayed in the activity monitor does not reflect the actual physical memory consumed by the emulator process. For more details, see Why does macOS activity monitor show high memory usage of the Emulator.

Using a Preconfigured Emulator

Since version 6.1.0 Beta2, DevEco Studio provides preconfigured emulators that you can use directly without manual creation (if no emulator exists locally).

NOTE

Currently, this feature is available only in the Chinese mainland.

In the device selection drop-down, select a preconfigured emulator and click . Download the image as prompted, or choose Tools > Device Manager > in the menu bar to download the image.

Creating an Emulator

  1. Choose Tools > Device Manager from the menu bar, and click Edit in the lower right-corner to set the storage path (Local Emulator Location) of the emulator instance. On macOS, emulator instances are stored in ~/.Huawei/Emulator/deployed by default. On Windows, emulator instances are stored in C:\Users\xxx\AppData\Local\Huawei\Emulator\deployed by default.

  2. On the Local Emulator tab, click New Emulator in the lower-right corner to create an emulator.

    On the emulator configuration page, you can select a default device template. If this is your first time using the device, click on the right of the device to download the emulator image. You can also update or delete the emulator image for different devices on this page.

    Click Edit to set the path for storing the image files. By default, these files are stored in ~/Library/Huawei/Sdk for macOS and C:\Users\xxx\AppData\Local\Huawei\Sdk for Windows.

    NOTE

    If the configuration page is not displayed properly (for example, the device list is empty), close DevEco Studio, go to the ~/Library/Huawei directory (or C:\Users\xxx\AppData\Local\Huawei on Windows), and delete the DevEcoStudiox.x folder (for example, DevEcoStudio6.0; the exact folder name depends on the installed DevEco Studio version) to clear the cache.

  3. Click Next and set device parameters.

    • Name: name of the emulator.
    • Boot options: boot mode of the emulator. This field is supported since DevEco Studio 6.1.0 Beta1.
      • Cold boot: Restart the emulator as a full power-on boot.
      • Quick boot: Load the snapshot saved at the last shutdown during startup, and restore the emulator to its previous state.
    • Memory: memory of the emulator.
    • Storage: storage size of the emulator.

    After confirming all parameters, click Finish to create the emulator.

  4. Start the emulator in either of the following ways:

    • Since DevEco Studio 6.1.0 Beta2, created emulators are displayed in the device list (up to ten emulators). Select one and click to start the emulator, build the project, and deploy the app or atomic service in one step.

    • On the Your Devices page, click to start the emulator.

  5. Choose Run > Run 'Module name' or click in DevEco Studio.

  6. Once DevEco Studio has finished building and deploying the app/atomic service, the app/atomic service can run on the emulator.

Search in Guides
Enter a keyword.