uni-app 安卓云打包失败,使用云端插件打包失败
uni-app 安卓云打包失败,使用云端插件打包失败
| 开发环境 | 版本号 | 项目创建方式 |
|---|---|---|
| Windows | win10 | HBuilderX |
产品分类:uniapp/App
PC开发环境操作系统:Windows
HBuilderX类型:正式
HBuilderX版本号:3.1.18
手机系统:Android
手机系统版本号:Android 11
手机厂商:模拟器
手机机型:xiaomi9
页面类型:vue
打包方式:云端
示例代码:
示例代码:
错误日志:
Appid: ****
[PackagePath]/app/AndroidManifest.xml:64:13-64 Error:
Attribute provider#android.support.v4.content.FileProvider@authorities value=(com.hangxun.fzk.fileprovider) from [openDefault-10.10.0.aar] AndroidManifest.xml:64:13-64
is also present at [sharefile-release.aar] AndroidManifest.xml:17:13-60 value=(com.hangxun.fzk.provider).
Suggestion: add 'tools:replace=\"android:authorities\"' to element at AndroidManifest.xml:62:9-70:20 to override.
[PackagePath]/app/AndroidManifest.xml:69:17-50 Error:
Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/filepaths) from [openDefault-10.10.0.aar] AndroidManifest.xml:69:17-50
is also present at [sharefile-release.aar] AndroidManifest.xml:22:17-51 value=(@xml/file_paths).
Suggestion: add 'tools:replace=\"android:resource\"' to element at AndroidManifest.xml to override.
FAILURE: Build failed with an exception.
-
What went wrong: Execution failed for task ‘:app:processReleaseMainManifest’. Manifest merger failed with multiple errors, see logs
-
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’.
…
更多关于uni-app 安卓云打包失败,使用云端插件打包失败的实战教程也可以访问 https://www.itying.com/category-93-b0.html
更多关于uni-app 安卓云打包失败,使用云端插件打包失败的实战教程也可以访问 https://www.itying.com/category-93-b0.html
这是一个典型的 AndroidManifest.xml 合并冲突问题。错误显示两个插件(openDefault 和 sharefile)都声明了 FileProvider,且 authorities 和 resource 属性冲突。
解决方案:
- 在 manifest.json 的源码视图中添加配置:
{
"app-plus": {
"android": {
"manifestPlaceholders": [
{
"name": "openDefault.manifest.placeholders.FILE_PROVIDER_AUTHORITIES",
"value": "com.hangxun.fzk.fileprovider"
},
{
"name": "sharefile.manifest.placeholders.FILE_PROVIDER_AUTHORITIES",
"value": "com.hangxun.fzk.provider"
}
]
}
}
}

