All Products
Search
Document Center

Adapt to multi-CPU architecture

Last Updated: Feb 25, 2022

In the mPaaS standard baseline, the dynamic libraries (.so files) used in the SDK support the armeabi architecture only. However, some users also need support for other CPU architectures, such as the armeabi-v7a architecture, or the arm64-v8a architecture for apps on Google Play.

Since 10.1.68.21, mPaaS has provided support for armeabi-v7a and arm64-v8a architectures. If your application needs to support architectures other than armeabi, please use the mPaaS plug-in to update the SDK to version 10.1.68.21 or later versions, and update the SDK described as follows and return to the relevant function.

If your app does not need to support architectures other than armeabi, you can still update the SDK to version 10.1.68.21 or later versions, and don’t have to make any modification.

Update configurations

Overall compatibility

  • Support AAR, mPaaS Inside and Portal&Bundle accessing methods.

  • Support armeabi, armeabi-v7a, and arm64-v8a architectures.

  • Support targetSdkVersion 26 - 29

  • Support Android 11.

Release app on Google Play

If your app needs to be released on Google Play and use the location component of mPaaS or the map function in the mini program, you need to remove the AMAP SDK built in mPaaS and use AMAP’s official version that can be approved by Google. Modify with reference to the following instructions:

Update Gradle configurations

Native AAR

Update Gradle version. We recommend version 6.2 and the earliest supported version is 5.0. If the latest version fails to compile, use the recommended version 6.2.

distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip

mPaaS Inside/Portal&Bundle

Update Gradle version. We recommend version 6.2 and the earliest supported version is 5.0. If the latest version fails to compile, use the recommended version 6.2.

distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip

Update agp version:

  • For mPaaS Inside access mode, modify it in the project root directory build.gradle.

  • For Portal&Bundle access mode, modify it in the root directory build.gradle of the Portal project and all Bundle projects.

classpath 'com.alipay.android:android-gradle-plugin:3.5.14'
classpath 'com.android.tools.build:gradle:3.5.3' // 3.5.0 earliest

Generate APK

Set CPU architecture

  • For Native AAR or mPaaS Inside access mode, set the architecture in the build.gradle of the main project module.

  • For Portal&Bundle access mode, set it in the build.gradle of the main module of the portal project if apk is generated, or in the build.gradle of the main module of the bundle project if the bundle is generated.

Set up abiFilters natively as follows:

ndk {
    abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
}

Compile

Compile as normal, without any modification.

Regression test

You need to make full regression testing for different architectures of the APK separately. In the regression test, you should focus on the following component functions (if used):

Components

Test items

Mobile Gateway Service

UC core

Code Scanner

  • Whether the standard UI scans the code successfully.

  • Whether the standard UI opens the phone album, takes photos and previews properly

  • If the custom UI is successful, you need to adapt part of the new API.

Datacenter

Social Sharing