This topic describes how to check configurations of the build script after you add a component and before you write code.
Procedure
Check the configuration of the
build.gradle
file in the root directory.Check whether the EasyConfig plug-in is imported.
classpath 'com.android.boost.easyconfig:easyconfig:?'
Check whether a baseline version is specified.
ext.mpaas_artifact = "mpaas-baseline" ext.mpaas_baseline = "10.1.68-41"
View the configuration in the App directory to check whether the EasyConfig plug-in is applied.
apply plugin: 'com.alipay.apollo.baseline.config'
Check the version of the Android Gradle plug-in.
Search the project for
com.android.tools.build:gradle
to view the version of the Android Gradle plug-in.If the version of the Android Gradle plug-in is earlier than version 4.0, no special configuration is required.
If the version of the Android Gradle plug-in is version 4.0 or later, open the
gradle.properties
file and addandroid.enableResourceOptimizations=false
. Then, in the App project, open thebuild.gradle
file, find the signingConfigs section, and explicitly add thev1SigningEnabled true
line. The following sample code shows the overall section.android { ... signingConfigs { release { ... v1SigningEnabled true } debug { ... v1SigningEnabled true } } }
If the version of the Android Gradle plug-in is version 7.0 or later, upgrade the EasyConfig plug-in to version 2.8.4 in the build.gradle file in the root directory.
classpath 'com.android.boost.easyconfig:easyconfig:2.8.4'