To build and package Genero Mobile for Android™ (GMA) applications, you must first install GMA.
Before you begin:
The installation and licensing of Genero products requires you to read and
accept the End User License Agreement, which can be found on the Four Js website at http://4js.com/end-user-license-agreements/.
Important:
The GMA and Genero BDL X.YZ versions are interdependent. For example, GMA 1.30 is required to
work with Genero BDL version 3.10, GMA 1.40 is required to work with Genero BDL 3.20.
- Download Genero Mobile for Android
(GMA) from the Four Js Web site.
- Install Genero Business Development Language. See Installing Genero BDL for
more details.
-
Install the Java Development Kit (JDK).
Important:
JDK version 8 is required to build Android apps. For the latest information regarding system requirements and Java support,
please refer to the Supported platforms and databases document, available on the
"Products" download page of the Four Js Web site.
-
Prepare the Android SDK installation
directory: First install the Android
Command Line Tools and setup the environment. The download of Android SDK packages will be done in a next step with gmabuildtool
updatesdk:
-
Create a directory to hold the Android SDK packages and tools.
-
Set the ANDROID_HOME environment variable with the new created directory.
-
Create the cmdline-tools directory in
$ANDROID_HOME.
-
Download the commandlinetools zip file and unzip the ZIP archive into the
$ANDROID_HOME/cmdline-tools directory.
Important: On Windows® 10,
the default zip tool provided by the operating system will corrupt the Android Command Line Tools zip archive. The error displayed is
"Error: Could not find or load main class
com.android.sdklib.tool.sdkmanager.SdkManagerCli"
. To avoid this error, use another zip
program such as 7zip.
-
Rename $ANDROID_HOME/cmdline-tools/cmdline-tools, to
"$ANDROID_HOME/cmdline-tools/latest".
Note: The commandlinetools ZIP archive provides cmdline-tools as root
directory, before renaming.
-
Add "$ANDROID_HOME/cmdline-tools/latest/bin" to your PATH environment
variable, to find the sdkmanager command.
-
Install the GMA buildtool and the GMA binary archive.
They are provided in the GMA distribution archive (fjs-gma-*.zip).
-
Create a directory (gma-install-dir) for the GMA development tools.
$ mkdir /opt/fourjs/gma-1.30
-
Extract the content of the Genero Mobile for Android package (fjs-gma-*.zip) into this
directory.
$ unzip -q -o -d /opt/fourjs/gma-1.30 fjs-gma-*.zip
-
Add the gma-install-dir directory to your PATH environment variable, in
order to find the gmabuildtool command.
-
Execute the gmabuildtool updatesdk command.
An internet connection is required.
Important: Execute the
gmabuildtool updatesdk command every time a new version of the GMA
buildtool and GMA binary archive is installed.
-
If you plan to publish your app on Google Play, register to Google Play as a developer and create a Google Play
project.
-
If you have installed Cordova plugins, you need to re-install the plugins with the
--install-plugin
option of gmabuildtool. For more details,
see Installing Cordova plugins.