minSdkVersion is used to specify the minimum Android version (API level) compatible with the application, and the default value is 19 (that is, the minimum support Android4.4). If some functions of the APP cannot support devices with a lower version of Android system, you can configure minSdkVersion to ensure that the APP can only be installed on devices with a specified Android version and above. In HBuilderX, minSdkVersion can be configured in manifest.json.

**️Note: When the app is upgraded, the minSdkVersion can only be increased and not decreased, that is to say, the app with high minSdkVersion cannot be overwritten and installed by the app with low minSdkVersion, developers need to pay attention! **

# Set minSdkVersion

The value of minSdkVersion is of type Number and must be a positive integer. For the range of values, refer to API level in Android version list.

Visual interface configuration

Source view configuration Open the manifest.json file of the project, switch to the "source view", and configure it according to the project type.

  • uni-app project Configure the minSdkVersion attribute of the "app-plus" -> "distribute" -> "android" node, the example is as follows:
  "app-plus": {
    "distribute": {
      "android":{
        "minSdkVersion": 21
      }
    }
  }
  • 5+App/Wap2App project items Configure the minSdkVersion attribute of the "plus" -> "distribute" -> "google" node, the example is as follows:
  "plus": {
    "distribute": {
      "google":{
        "minSdkVersion": 21
      }
    }
  }

# Precautions

After configuring minSdkVersion, save and submit the App cloud package to take effect, and pay attention to the following issues:

  • Some functions in the App module configuration use the third-party SDK. The third-party SDK may have requirements for minSdkVersion. In this case, the maximum minSdkVersion value will be taken.
  • The uni native plugin may also have requirements for minSdkVersion, in which case the maximum minSdkVersion value will be taken

Note: If other modules or plugins set minSdkVersion during cloud packaging, the final maximum minSdkVersion value will take effect

# Android version list

The corresponding list of API levels and Android versions is as follows:

API level Android version number Android version name
36 Android16 Android W
35 Android15 Android V, Vanilla Ice Cream
34 Android14 Android U, Upside Down Cake
33 Android13 Android T, Tiramisu
32 Android12L Android Sv2
31 Android12 Android S, Snow Cone
30 Android11 Android R, Red Velvet Cake
29 Android10 Android Q, Quince Tart
28 Android9 Android P, Pie
27 Android8.1 Android O_MR1
26 Android8.0 Android O, Oreo
25 Android7.1 Android N_MR1
24 Android7.0 Android N, Nougat
23 Android6.0 Android M, Marshmallow
22 Android5.1 Android L_MR1
21 Android5.0 Android L, Lollipop
20 Android4.4W Kitkat Watch
19 Android4.4 Kitkat