Creating an Extension Library for Android

Official Content
This documentation is valid for:

To create an extension library for Android to be used as an extensibility point you need to do some modifications to the standard Android project. Follow these steps

Variables declaration

Make sure to set the following environment variables:

  • GENEXUS_HOME to your Genexus installation directory.
  • ANDROID_HOME to your Android SDK directory.

Project creation

Create a new Android project with no activities using Android Studio.

Set it as a Library Project

Locate the file build.gradle file and change the following tag

apply plugin: ''


apply plugin: ''

Remove applicationId

You'll also need to remove applicationId in the defaultConfig section:

applicationId "com.example.applicationname"


Under the dependencies section make sure to point to the correct FlexibleClient version, otherwise a compile error will occur.

For GeneXus 15 Upgrade 9 or lower versions use:

dependencies {
    implementation 'com.genexus:FlexibleClient:1.0'

For Genexus 15 Upgrade 10 use:

dependencies {
    implementation 'com.genexus:FlexibleClient:15.10-SNAPSHOT'

For GeneXus 15 Upgrade 11 use:

dependencies {
    implementation 'com.genexus:FlexibleClient:15.11-SNAPSHOT'


Modify the minSdkVersion to 16 to match GeneXus #15 requirements

defaultConfig {
    minSdkVersion 16


Add the following section to declare associated repositories:

repositories {
    maven { url "file:///${System.env.GENEXUS_HOME}/Android/m2Repository" }

When using GeneXus 15 Upgrade 8 you need to declare two repositories:

repositories {
    maven { url "file:///${System.env.GENEXUS_HOME}/Android/MavenRepositories/genexusRepository" }
    maven { url "file:///${System.env.GENEXUS_HOME}/Android/MavenRepositories/thirdpartiesRepository" }

Project attributes

Add the following attributes, you need to match this information with the .library file. = 'com.example.libraryname'
project.version = '1.0'

Use gradle-mvn-push.gradle

Add the following section to apply the Gradle Maven plugin (gradle-mvn-push):

apply from: rootProject.file('gradle-mvn-push.gradle')

Copy the gradle-mvn-push.gradle file from the Sample project to your Android library location. You need to update the following properties according to your project:

project.version = '1.0' = 'com.example.libraryname'


Locate the AndroidManifest.xml and remove the following tag


Start coding

After changing the previous default Android configuration you can start coding your extensibility points in Android.

Every time you need to push your modifications to the GeneXus environment, execute the following from the Android Library location:

gradlew uploadArchives

See Also

Extension Library concept for Extending GeneXus for Smart Devices

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