Set up the Android studio project and build the Android app set-up-the-android-studio-project-and-build-the-android-app

CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.

This article is for building the AEM Forms App 6.3.1.1 and later versions. For building an app from source code of source code of the AEM Forms App 6.3, see Set up the Eclipse project and build the Android™ app.

AEM Forms provides the complete source code of the AEM Forms app. The source contains all components to build a custom AEM Forms app. The source code archive, adobe-lc-mobileworkspace-src-<version>.zip is a part of the adobe-aemfd-forms-app-src-pkg-<version>.zip package on Software Distribution.

To get the AEM Forms app source, perform the following steps:

  1. Open Software Distribution. You require an Adobe ID to log in to the Software Distribution.

  2. Tap Adobe Experience Manager available in the header menu.

  3. In the Filters section:

    1. Select Forms from the Solution drop-down list.
    2. Select the version and type for the package. You can also use the Search Downloads option to filter the results.
  4. Tap the package name applicable to your operating system, select Accept EULA Terms, and tap Download.

  5. Open Package Manager and click Upload Package to upload the package.

  6. Select the package and click Install.

The following image displays the extracted contents of the adobe-lc-mobileworkspace-src-<version>.zip.

Extracted contents of the zipped Android™ source

The following image displays the directory structure of the androidfolder in the srcfolder.

Directory structure of the android folder in src

Build standard AEM Forms app set-up-the-xcode-project

  1. Perform the following steps to set up a project in Android™ Studio and provide a signing identity:

    Log in to a machine that has Android™ Studio installed and configured.

  2. Copy the downloaded adobe-lc-mobileworkspace-src-<version>.zip archive to:

    For MAC users: [User_Home]/Projects

    For Windows® users: %HOMEPATH%\Projects

    note note
    NOTE
    For Windows®, it is recommended that you keep the android project in the system drive.
  3. Extract the archive in the following directory:

    For MAC users: [User_Home]/Projects/[your-project]

    For Windows® users: %HOMEPATH%\Projects\[your-project]

    note note
    NOTE
    It is recommended, that you keep the extracted android project in the system drive before importing the project into Android Studio.
  4. Launch Android™ Studio.

    For MAC users: Update the local.properties file present in the [User_Home]/Projects/[your-project]/android folder and point the sdk.dir variable to SDK location on your desktop.

    For Windows® users: Update the local.properties file present in the %HOMEPATH%\Projects\[your-project]\android folder and point the sdk.dir variable to SDK location on your desktop.

  5. Click Finish to build the project.

    The project is available in the ADT Project Explorer.

    eclipse project after building the app

  6. In Android™ Studio, select Import Project (Eclipse ADT, Gradle, Etc.).

  7. In the project explorer, select the root directory of the project that you want to build in the Root Directory text box:

    For Mac users: [User_Home]/Projects/MobileWorkspace/src/android

    For Windows® users: %HOMEPATH%\Projects\MobileWorkspace\src\android

  8. After the project is imported, a pop-up appears with option to update the Android™ plugin Gradle. Click the appropriate button depending on your requirement.

    dontremindmeagainforthisproject

  9. After successful gradle build, the following screen appears. Connect the appropriate device or emulator with the system and click Run Android™.

    gradleconsole

  10. Android™ Studio displays the connected devices and available emulators. Select the device on which you want to run the application and then click OK.

    connecteddevice

After you have built the project, you can choose to install the app using Android™ Debug Bridge or Android™ Studio.

Using Android™ Debug Bridge andriod-debug-bridge

You can install the application on an Android™ device via the Android™ Debug Bridge with the following command:

For MAC users: adb install [User_Home]/Projects/[your-project]/adobe-lc-mobileworkspace-src-[version]/android/build/outputs/apk/android-debug.apk

For Windows® users: adb install %HOMEPATH%\Projects\[your-project]\adobe-lc-mobileworkspace-src-[version]\android\build\outputs\apk\android-debug.apk

recommendation-more-help
a6ebf046-2b8b-4543-bd46-42a0d77792da