Table of contents

Introduction

Quick start

Requirements and Installation

Understanding SD application development

The development cycle

Application look and feel

Security

Monetizing

Notifications

Geolocation

Timezone

Cache Management

Extensibility

Troubleshooting

Online resources

 



i
This is not the latest version of this document; to access the latest version, click here.
Official Content

Alert: Google Play will require that new apps target at least Android 8.0 (API level 26) from August 2018, and that app updates target Android 8.0 from November 2018. ref.: https://developer.android.com/distribute/best-practices/develop/target-sdk.

This implies that you must use GeneXus 15 Upgrade 9 or higher to be able to deploy to Google Play.


If you need to create an Android application using GeneXus, then it is necessary to you to have the Android SDK installed. But at first sight it might be a little intricate to know which packages of the Android SDK have to be downloaded, for that reason, this document explains the minimum content required, suggestions and tips for making easier your Android development with GeneXus.

The minimal requirements are:

  • Android SDK 2.1
  • Google APIs:7 (2.1)

You can download the latest version of the Android SDK from the following link: http://developer.android.com/sdk/index.html#ExistingIDE (Download available under option "Use an Existing IDE")

The Android SDK provides you of all necessary packages to build and compile Android apps as also provides some extras like Virtual Devices, Google Services packages and many others.

Android SDK installation and content

It is strongly recommended to install the Android SDK in whatever directory with no blank spaces or any special characters. See Build Performance below in this document for further information.

Opening the SDK Manager application enables you to download specific contents of the Android SDK. This is the minimum content you need in order to build and compile Android applications with GeneXus:

  • Android SDK Tools
  • Android SDK Platform-tools
  • Android SDK Build-tools (Latest version is always recommended)
  • Android 4.0.3 (API 15)
    • SDK Platform
    • Google APIs

Android Requirements Minimum Content

With this configuration you are available to run Android applications on your device (if it is plugged into your computer).

Using Android virtual devices

If for some reason you want to run your application in an Android Virtual Device, then you should download some extra content of the Android SDK. Once the necessary content is downloaded and installed you can follow the instructions at the Creating an Android Virtual Device document to create an Android  Virtual Device.

Android 4.x virtual devices

If you want to run an Android 4.x Virtual Device you have to download the SDK Platform, Google APIs and an Android System Image of the Android version you want. 
For instance, to run your application on an Android 4.0.3 (API 15) Virtual Device, you need to download an Android System Image of the Android API 15 as it is shown in the following images:

Android Requirements API 15 System Image Flecha_der Android Requirements API 15 System Image Installed

Note: If you have an Intel based computer, it is recommended to download the Intel x86 Atom System Image because of its better performance.

Android 2.x virtual devices

If you want to run your application in an Android 2.x Virtual Device you have to download the SDK Platform and the Google APIs of the Android version you want. 
For instance, to run your application on an Android 2.1 (API 7) Virtual Device, you need to download the SDK Platform and the Google APIs of the Android API 7 as it is shown in the following image:

Android Requirements API 7 Content

Note: Android 2.x Virtual Devices are commonly used because its better performance compared to the Android 4.x Virtual Devices.

Checking your Android SDK installation

If you have doubts about what Android SDK version you have installed and/or what API levels it supports you may:

  • run the following command to get a list of all installed APIs: "

C:\<Android_SDK_Installation_Directory>\Tools\android.bat list target

  • run the SDK Manager from the Windows Start menu or the following command:

C:\<Android_SDK_Installation_Directory>\"SDK manager"

Build performance with Android SDK

As of GeneXus X Evolution 2 Upgrade 2 major performance improvements were made in the build/run process. These improvements involve GeneXus, the Android SDK and you as the developer:

  • GeneXus

Just install GeneXus X Evolution 2 as of Upgrade 2 or newer

Please note that the patch should not be applied if you are using the Android SDK outside GeneXus, for any project in which RenderScript is used. Check for details on the description of the download center.

  • Developer
    Be sure not to install the Android SDK in a directory with blank spaces or any special characters. The default Android SDK installation directory is "C:\Program Files (x86)\Android", then you need to change this directory to another with no blank spaces or any special characters (For instance: "C:\AndroidSDK")

If any of the above requirements is not met, you will experience low build/run performance and you will see the following warning message in the Build output window in GeneXus:

Android build may be slow due to environment configuration. Please check the following documentation page for tips to optimize it. (Android Requirements).

Tips

Genexus setup program searches Android SDK version at Windows registry key "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools" for 64 bits Windows  and "HKEY_LOCAL_MACHINE\SOFTWARE\Android SDK Tools" for 32 bits Windows.

Once the SDK Directory is found it searches the file "<Android_SDK_Installation_Directory>\tools\source.properties" to check that the property "Pkg.Revision="  is 20, 21.0 or 21.1

Related pages

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant