1.拷贝本地library库,setting.gradle配置library库
增加配置项目build.gradle如下:
ext { androidXVersion = '1.1.0' commonLibVersion= '4.1.1' versionCompiler = 28 // when target=27, 9.0 is ok versionTarget = 27 // if hope supporting 4.4 // please modify it to 16 minSdkVersion = 21 versionCode = 100 versionNameString = '2.3.5.20210316' javaSourceCompatibility = JavaVersion.VERSION_1_8 javaTargetCompatibility = JavaVersion.VERSION_1_8 }
2.app 的gradle引入library库
3. dcloud_control.xml 修改appid 以及assets相关目录名称
4.dcloud_uniplugins.json 增加本地原生插件
5.app gradle android脚本中增加:
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
6.增加自定义application 并修改manifest
7.在Application节点增加
tools:replace="android:icon,android:name"
tools:ignore="HardcodedDebugMode,MissingClass"
8.manifest 增加新增的权限
9.gradle.properties 增加
org.gradle.jvmargs=-Xmx1024m
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
10.修改应用包名以及provider
11.配置appid build.gradle 配置申请签名时候的签名文件