uni-app Html5app-Baichuan导致的云打包失败
uni-app Html5app-Baichuan导致的云打包失败
| 开发环境 | 版本号 | 项目创建方式 |
|---|---|---|
| Windows | 10 | HBuilderX |
产品分类:uniapp/App
PC开发环境操作系统:Windows
HBuilderX类型:正式
HBuilderX版本号:2.7.14
手机系统:Android
手机系统版本号:Android 11
手机厂商:小米
手机机型:k30
页面类型:vue
打包方式:云端
操作步骤:
- menifest.json 选择payment支付模块
- Html5app-Baichuan plugin只保留Html5app-Baichuan\android\res\drawable\yw_1222.jpg
### 预期结果:
- 云打包正常
实际结果:
-
Appid: UNI0DDA811
-
[PackagePath]/app/AndroidManifest.xml:29:13-85 Error:
-
Attribute activity#com.alipay.sdk.app.H5PayActivity@configChanges value=(orientation|keyboardHidden|navigation|screenSize) from [alipaysdk-noutdid-15.8.00.201112210139.aar] AndroidManifest.xml:29:13-85 is also present at [nb_trade-4.0.0.8.aar] AndroidManifest.xml:43:13-74 value=(orientation|keyboardHidden|navigation).
-
Suggestion: add ‘tools:replace=“android:configChanges”’ to element at AndroidManifest.xml:27:9-32:20 to override.
-
FAILURE: Build failed with an exception.
-
What went wrong:
- Execution failed for task ‘:app:processReleaseMainManifest’.
- Manifest merger failed : Attribute activity#com.alipay.sdk.app.H5PayActivity@configChanges value=(orientation|keyboardHidden|navigation|screenSize) from [alipaysdk-noutdid-15.8.00.201112210139.aar] AndroidManifest.xml:29:13-85 is also present at [nb_trade-4.0.0.8.aar] AndroidManifest.xml:43:13-74 value=(orientation|keyboardHidden|navigation). Suggestion: add ‘tools:replace=“android:configChanges”’ to element at AndroidManifest.xml:27:9-32:20 to override.
- Execution failed for task ‘:app:processReleaseMainManifest’.
-
Try:
- Run with --debug option to get more log output. Run with --scan to get full insights.
-
Exception is:
- org.gradle.api.tasks.TaskExecutionException: Execution failed for task ‘:app:processReleaseMainManifest’.
-
### bug描述:
- Html5app-Baichuan plugin 导致云打包失败
更多关于uni-app Html5app-Baichuan导致的云打包失败的实战教程也可以访问 https://www.itying.com/category-93-b0.html
项目中使用了官方的uni.requestPayment
插件文档也看了 https://ext.dcloud.net.cn/plugin?id=729#detail 就是打包不了,试了几个HbuiderX版本了
如何解决?
https://service.dcloud.net.cn/build/errorLog/5d92c4d0-9f1b-11eb-ba82-172db56a5f44
这个错误是由于多个第三方SDK在AndroidManifest.xml中的configChanges属性冲突导致的。具体是支付宝SDK(alipaysdk-noutdid)和Html5app-Baichuan插件中的nb_trade模块在定义H5PayActivity时配置了不同的configChanges值。
解决方案:
在项目的manifest.json文件中添加以下配置:
{
"app-plus": {
"android": {
"manifest": {
"activities": [{
"name": "com.alipay.sdk.app.H5PayActivity",
"configChanges": "orientation|keyboardHidden|navigation|screenSize"
}]
}
}
}
}


