All Products
Search
Document Center

mPaaS Inside environment configuration in componentized access mode

Last Updated: Mar 10, 2021

Before proceeding with client-side development, you will first need to configure your development environment:

Configure the Windows development environment

Configure the Windows development environment with reference to the following instructions:

Configure Java 8 environment

mPaaS framework only supports JDK 8+:

  1. Download and install JDK 8.
  2. Configure the JAVA_HOME environment variable and add the bin path under JAVA_HOME to the PATH environment variable.
  3. Once properly configured, run the java -version command from the command line and you will view the JDK version and other information.
    java_version_cmd.png

Configure Gradle 4.4 environment

mPaaS framework only supports Gradle 4.4.

  1. If your project was originally built with Gradle Wrapper, we recommend you to change the version number to 4.4 in the project directory /gradle/wrapper/gradle.properties.
  2. If your project does not use Gradle Wrapper, we recommend you to use the global Gradle version 4.4 and then call gradle wrapper --gradle-version=4.4 to install a gradle wrapper.After these steps, you only need to use ./gradlew in a way that minimizes the impact on your development environment.

Use an independent gradle

  1. Download Gradle 4.4.zip.
  2. Unzip the .zip package, then configure the unzip path to the GRADLE_HOME environment variable, and add the bin path under GRADLE_HOME to the PATH environment variable.
  3. Once properly configured, run the gradle -v command from the command line and you will view the Gradle version and other information.
    gradle_v_cmd.png

Install and configure Android Studio

#Install Android Studio

The latest mPaaS plug-in only supports Android Studio of version 4.0 and later versions.

  • For the information about downloading Android Studio, see Android Developers.
  • Installation guide.
  • If you were using an earlier version of Android Studio and already had the mPaaS plug-in installed, then after you upgrade from an earlier version of Android Studio to 4.0 or later versions you will only need to upgrade the mPaaS plug-in to the latest version. For more details, see Upgrade mPaaS plug-ins.
  • If you need to support the mPaaS plug-in for Android Studio earlier than version 4.0, install it as an offline installer after downloading the offline installer. For more instructions on offline installation, please refer to the offline installation of mPaaS plug-in.

Install Android SDK

You need to install the Android SDK with API Level 19 and 26.

  1. In Android Studio, open the Settings dialog through File > Settings.
  2. Check the SDKs with API Level 19 and 26 in the Android SDK dialog box , and click the Apply button to install, as shown in the following figure:
    install_android_sdk

Install mPaaS plug-in

More information on the installation of mPaaS plug-in, please refer to the Installation of mPaaS plug-in

Configure the Gradle build tool

You need to make sure that the project is built with Gradle Wrapper:

  1. In Android Studio, open the Settings dialog through File > Settings.
  2. Check the Use default gradle wrapper in the Gradle dialog box, and click the Apply button, as shown in the following figure:
    gradle

Configure the macOS development environment

Configure the macOS development environment according to the following description:

Configure Java 8 environment

mPaaS framework only supports JDK 8+:

  1. Download and install JDK 8.
  2. Configure the JAVA_HOME environment variable and add the bin path under JAVA_HOME to the PATH environment variable.
  3. Once properly configured, run the java -version command from the command line and you will view the JDK version and other information.
    java_version_cmd.png

Configure Gradle 4.4 environment

mPaaS framework only supports Gradle 4.4.

  1. If your project was originally built with Gradle Wrapper, we recommend you to change the version number to 4.4 in the project directory /gradle/wrapper/gradle.properties.
  2. If your project does not use Gradle Wrapper, we recommend you to use the global Gradle version 4.4 and then call gradle wrapper --gradle-version=4.4 to install a gradle wrapper.After these steps, you only need to use ./gradlew in a way that minimizes the impact on your development environment.

Use an independent gradle

  1. Download Gradle 4.4.zip.
  2. Unzip the .zip package, then configure the unzip path to the GRADLE_HOME environment variable, and add the bin path under GRADLE_HOME to the PATH environment variable.
  3. Once properly configured, run the gradle -v command from the command line and you will view the Gradle version and other information.
    gradle_v_cmd.png

Install and configure Android Studio

#Install Android Studio

The latest mPaaS plug-in only supports Android Studio of version 4.0 and later versions.

  • For the information about downloading Android Studio, see Android Developers.
  • Installation guide.
  • If you were using an earlier version of Android Studio and already had the mPaaS plug-in installed, then after you upgrade from an earlier version of Android Studio to 4.0 or later versions you will only need to upgrade the mPaaS plug-in to the latest version. For more details, see Upgrade mPaaS plug-ins.
  • If you need to support the mPaaS plug-in for Android Studio earlier than version 4.0, install it as an offline installer after downloading the offline installer. For more instructions on offline installation, please refer to the offline installation of mPaaS plug-in.

Install Android SDK

You need to install the Android SDK with API Level 19 and 26.

  1. Open the Settings dialog box through Android Studio > Preferences in Android Studio.
  2. Check the SDKs with API Level 19 and 26 in the Android SDK dialog box , and click the Apply button to install, as shown in the following figure:
    install_android_sdk

Install mPaaS plug-in

More information on the installation of mPaaS plug-in, please refer to the Installation of mPaaS plug-in

Configure the Gradle build tool

You need to make sure that the project is built with Gradle Wrapper:

  1. Open a random Andriod project in Android Studio.
  2. Open the Setting dialog box.
  3. Check the Use default gradle wrapper in the Gradle dialog box, and click the Apply, as shown in the following figure:
    use_gradle_wrapper.png

Configure the Linux development environment

Configure the Linux development environment according to the following description.
Note: This text is applicable to CentOS and Ubuntu versions only, as there are too many versions of Linux OS.

Configure Java 8 environment

mPaaS framework only supports JDK 8+:

  1. Download and install JDK 8.
  2. Configure the JAVA_HOME environment variable and add the bin path under JAVA_HOME to the PATH environment variable.
  3. Once properly configured, run the java -version command from the command line and you will view the JDK version and other information.
    java_version_cmd.png

Configure Gradle 4.4 environment

  1. If your project was originally built with Gradle Wrapper, we recommend you to change the version number to 4.4 in the project directory /gradle/wrapper/gradle.properties.
  2. If your project does not use Gradle Wrapper, we recommend you to use the global Gradle version 4.4 and then call gradle wrapper --gradle-version=4.4 to install a gradle wrapper.After these steps, you only need to use ./gradlew in a way that minimizes the impact on your development environment.

Use an independent gradle

  1. Download Gradle 4.4.zip.
  2. Unzip the .zip package, then configure the unzip path to the GRADLE_HOME environment variable, and add the bin path under GRADLE_HOME to the PATH environment variable.
  3. Once properly configured, run the gradle -v command from the command line and you will view the Gradle version and other information.
    gradle_v_cmd.png

Install 32-bit compatible library

By default,ia32-lib is removed for the release versions of Linux such as CentOS 6, CentOS 7, and Ubuntu. All 64-bit Linux systems must be installed with 32-bit compatible libraries. Refer to the installation method of android-sdk:

  1. Ubuntu:
  2. sudo apt-get install zlib1g:i386
  3. CentOS:
  4. yum install libstdc++.i686

Install and configure Android Studio

#Install Android Studio

The latest mPaaS plug-in only supports Android Studio of version 4.0 and later versions.

  • For the information about downloading Android Studio, see Android Developers.
  • Installation guide.
  • If you were using an earlier version of Android Studio and already had the mPaaS plug-in installed, then after you upgrade from an earlier version of Android Studio to 4.0 or later versions you will only need to upgrade the mPaaS plug-in to the latest version. For more details, see Upgrade mPaaS plug-ins.
  • If you need to support the mPaaS plug-in for Android Studio earlier than version 4.0, install it as an offline installer after downloading the offline installer. For more instructions on offline installation, please refer to the offline installation of mPaaS plug-in.

Install Android SDK

You need to install the Android SDK with API Level 19 and 26.

  1. In Android Studio, open the Settings dialog through File > Settings.
  2. Check the SDKs with API Level 19 and 26 in the Android SDK dialog box , and click the Apply button to install, as shown in the following figure:
    install_android_sdk.png

Install mPaaS plug-in

More information on the installation of mPaaS plug-in, please refer to the Installation of mPaaS plug-in

Configure the Gradle build tool

You need to make sure that the project is built with Gradle Wrapper:

  1. Open a random Andriod project in Android Studio.
  2. Open the Setting dialog box.
  3. Check the Use default gradle wrapper in the Gradle dialog box, and click the Apply button, as shown in the following figure:
    use_gradle_wrapper.png