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.
- Open Windows PowerShell or Command Prompt.
- Open your Android SDK directory by using cd command.
> cd <my_android_sdk_directory>/tools/bin
- Execute avdmanager.bat tool with create avd command as follows.
> C:\<my_android_sdk>\tools\bin\avdmanager create avd --name MyAndroidTablet
--tag "google_apis" --abi "x86" --device "7in WSVGA (Tablet)"
Name of the new AVD.
-- packages, --tag, --abi
Must satisfy Android Requirements for your GeneXus installation.
The device name. Available devices can be listed by executing:
> C:\<my_android_sdk>\tools\bin\avdmanager list device
- Run your new Android emulator by executing emulator program.
> C:\<my_android_sdk>\tools\emulator -avd MyAndroidTablet
- Open Android Studio.
- Go to Tools > Android > AVD Manager.
- Select "Create Android Device.." button.
- 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.
- Select the system image. Must satisfy Android Requirements for your GeneXus Installation.
Then, click "Next" button.
- Select the name for your AVD and click on Finish.
- Finally, select the device previously created and click on "Play" icon to launch it.
Warning: These components are no longer available as of Android SDK 25.3.0.
- 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.
- Click on the "Create..." button.
- 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.
- 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.