Mini Program upgrade guide

更新时间:
复制 MD 格式

Upgrading the Mini Program software development kit (SDK) to version 10.1.60 introduces the following changes.

API changes

  • A new MPTinyHelper class is available. Use this class to configure the information required for Mini Program APIs, real-device previews, and debugging.

    • Set the application name. The Mini Program getSystemInfo API uses this setting to retrieve the application name.

      public void setAppName(String name)
    • Set the application version number. The Mini Program getSystemInfo API uses this setting to retrieve the application version number.

      public void setVersionName(String versionName)
    • Set the Mini Program virtual domain name. Real-device debugging depends on this virtual domain name to resolve requests.

      public void setTinyAppVHost(String vhost)

Project configuration changes

If you use the component-based (Portal & Bundle) connection type, note the following:

  • The minimum required version for com.alipay.android:android-gradle-plugin is 3.0.0.8.0.

  • To use Mini Programs and H5 with Portal & Bundle, set enableNebulaMetaInfo and useMetaInfoClass to true in the portal field of the build.gradle file in your project's main module. For example:

    portal {
      // Other configurations are omitted for brevity. Do not delete existing configurations. Also, do not add the portal block if it already exists in the gradle file.
      enableNebulaMetaInfo true
      useMetaInfoClass true
    }