Creating an Android Virtual Device

Official Content

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. 

image_20171222101449_1_png

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)"
    Notes:
    -- 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.
    image_2017122212223_1_png
     
  2. Go to Tools > Android > AVD Manager.
    image_20171222121340_1_png
     
  3. Select "Create Android Device.." button.
    image_20171222121510_1_png
     
  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.
    AndroidStudio2_2017122212934_1_png
     
  5. Select the system image. Must satisfy Android Requirements for your GeneXus Installation.
    AndroidStudio3_png
    Then, click "Next" button.
  6. Select the name for your AVD and click on Finish.
    AndroidStudio4_png
     
  7. Finally, select the device previously created and click on "Play" icon to launch it.
    AndroidStudio1_20171222122053_1_png

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.
    image_201712221005_1_png
     
  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.
    CreateNew_png
     
  4. On the AVD Manager, select your new emulator and click on "Start..." button. In the new window displayed, click on "Lunch".
    Start_20171222101254_1_png
    The new AVD will start.
    image_20171222101336_1_png
     
  5. Done!

See also


Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.