Creating an Android Virtual Device

Official Content
This documentation is valid for:

You do not have to create an Android Virtual Device (AVD) as GeneXus does it for you. By default, the first time GeneXus runs an Android application it tries to create an AVD called "Genexus-APIX-x86" with the supported Android version, where X will be the number of the API version used (e.g. 24 for the Android 7.0).

You may need to change the default AVD created by GeneXus if your application requires more/less memory, more storage, a different layout (e.g. tablet), etc. This article explains three alternatives of how to create your own AVD instances. Ensure start the emulator with one of these new AVD before running the application from GeneXus, which automatically detect the AVD instance started (avoid start multiple emulators). Refer to Prototyping device selection - Android for details.

In the following examples, we'll try to create an Android 7" Tablet, but feel free for adding your customizations. 


Option 1: From avdmanager command-line tool

  1. Open Windows PowerShell or Command Prompt.
  2. Open your Android SDK directory by using cd command.
    > cd <my_android_sdk_directory>/tools/bin
  3. Execute avdmanager.bat tool with create avd command as follows.
    > C:\<my_android_sdk>\tools\bin\avdmanager create avd --name MyAndroidTablet 
                                                --packages "system-images;android-24;google_apis;x86" 
                                                --tag "google_apis" --abi "x86" --device "7in WSVGA (Tablet)"
    -- name
    Name of the new AVD. 

    -- packages, --tag, --abi 
    Must satisfy Android Requirements for your GeneXus installation.

    -- device
    The device name. Available devices can be listed by executing: 
    > C:\<my_android_sdk>\tools\bin\avdmanager list device
  4. Run your new Android emulator by executing emulator program.
    > C:\<my_android_sdk>\tools\emulator -avd MyAndroidTablet
  5. Done!

Option 2: From Android Studio

  1. Open Android Studio.
  2. Go to Tools > Android > AVD Manager.
  3. Select "Create Android Device.." button.
  4. Select which device you want to create (also you can customize, create new, or import one previously created).
    As we mentioned before, we'll create a 7" Android Tablet.
  5. Select the system image. Must satisfy Android Requirements for your GeneXus Installation.
    Then, click "Next" button.
  6. Select the name for your AVD and click on Finish.
  7. Finally, select the device previously created and click on "Play" icon to launch it.

Option 3: From AVD Manager program

Warning: These components are no longer available as of Android SDK 25.3.0.

  1. Go to your Android SDK directory and open the Android Virtual Manager program (called AVD Manager.exe). If you haven't installed the Android SDK, please follow  Android Requirements to install it.
  2. Click on the "Create..." button.
  3. Complete the fills with your preferences, and click "OK" button.
    Ensure that Target and CPU/ABI is under the scope of the Android Requirements for your GeneXus upgrade.
  4. On the AVD Manager, select your new emulator and click on "Start..." button. In the new window displayed, click on "Lunch".
    The new AVD will start.
  5. Done!

See also