All Products
Search
Document Center

Mobile Platform as a Service:Static Environment Switching

Last Updated:May 22, 2026

Prerequisites

You must have an app built on the mPaaS framework. For more information, see mPaaS Framework > Quick start.

Static environment switching requires easyconfig. easyconfig works as follows:

  • You can modify the meta attributes of the AndroidManifest workspace.

  • Modify the mpaas.properties file in the assets directory.

  • If the mPaaS project configuration file contains the base64 attribute and the attribute is not empty, it generates the Security Guard encrypted image yw_1222.jpg.

Public cloud

To switch workspaces in a public cloud environment, follow these steps:

  1. Ensure that the build.gradle file in the project root directory contains the following dependencies:

    Note

    These dependency versions may be updated in future releases.

     classpath 'com.alipay.android:android-gradle-plugin:3.0.0.9.13'
     // The version must be later than 2.8.4
     classpath 'com.android.boost.easyconfig:easyconfig:2.8.4'
  2. Ensure that the build.gradle file in the main module (android main module) contains the following configuration (Note the order):

     apply plugin: 'com.alipay.portal'
     // Place this after 'com.alipay.portal'
     apply plugin: 'com.alipay.apollo.baseline.update'
  3. Download the .config configuration file for the workspace from the console. For more information, see Create an application in the console > Download the configuration file.

  4. Add the downloaded .config configuration file to the main module (android main module) directory. As shown in the following figure:

    修改11.png

    Important

    Keep only the configuration file for the target workspace.

Apsara Stack

To switch workspaces in an Apsara Stack environment, follow these steps:

  1. Ensure that the build.gradle file in the project root directory contains the following dependencies:

    Note

    These dependency versions may be updated in future releases.

     classpath 'com.alipay.android:android-gradle-plugin:3.0.0.9.13'
     // The version must be later than 2.8.4
     classpath 'com.android.boost.easyconfig:easyconfig:2.8.4'
  2. Ensure that the build.gradle file of the main module (android main module) contains the following configuration (note the order):

     apply plugin: 'com.alipay.portal'
     // Place this after 'com.alipay.portal'
     apply plugin: 'com.alipay.apollo.baseline.update'
  3. Download the .config configuration file for the corresponding workspace from the console. For more information, see Create an application in the console > Download the configuration file.

  4. Add the downloaded .config configuration file to the android main module directory. As shown in the following figure:

    修改22.png

    Important

    Keep only the configuration file for the target workspace.

  5. Use the mPaaS plugin to generate the yw_1222.jpg encrypted image. For more information, see Encrypted Image (Apsara Stack).