鲸鱼风风
鲸鱼风风
  • 发布:2022-12-07 14:32
  • 更新:2022-12-07 14:32
  • 阅读:270

【报Bug】原生插件绑定多个包名,打包失败。(已尝试删除重新添加原生插件)

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: 11

HBuilderX类型: 正式

HBuilderX版本号: 3.6.4

手机系统: Android

手机系统版本号: Android 11

手机厂商: 小米

手机机型: 6

页面类型: vue

vue版本: vue2

打包方式: 云端

项目创建方式: HBuilderX

操作步骤:

见bug描述

预期结果:

打包成功

实际结果:

打包失败

bug描述:

同一个 APPID 的 uni项目 的原生插件绑定了2个包名:com.example.A 和 com.example.B。
我想用 com.example.B 打包。
原生插件配置如下:

"nativePlugins" : {  
            "app-device-module" : {  
                "__plugin_info__" : {  
                    "name" : "跳转Google Play升级 + 获取安卓设备信息(超级全)",  
                    "description" : "跳转Google Play升级 + 获取安卓设备信息(如:连接的Wifi名称、手机可用内存、网络类型、出厂签名、设备蓝牙名称、是否被root 等等应有尽有)",  
                    "platforms" : "Android",  
                    "url" : "https://ext.dcloud.net.cn/plugin?id=6467",  
                    "android_package_name" : "com.example.B",  
                    "ios_bundle_id" : "com.example.B",  
                    "isCloud" : true,  
                    "bought" : 1,  
                    "pid" : "6467",  
                    "parameters" : {}  
                }  
            },  
            "openinstall-plugin" : {  
                "APP_KEY" : "XXXXXXXX",  
                "__plugin_info__" : {  
                    "name" : "openinstall-App全渠道统计",  
                    "description" : "方便集成使用 openinstall 功能而开发,实现了携带参数安装,渠道统计(H5渠道、广告平台渠道、ASA渠道等),一键拉起全部功能",  
                    "platforms" : "Android,iOS",  
                    "url" : "https://ext.dcloud.net.cn/plugin?id=692",  
                    "android_package_name" : "com.example.B",  
                    "ios_bundle_id" : "com.example.B",  
                    "isCloud" : true,  
                    "bought" : 1,  
                    "pid" : "692",  
                    "parameters" : {  
                        "APP_KEY" : {  
                            "des" : "openinstall为iOS应用生成的appkey",  
                            "key" : "com.openinstall.APP_KEY",  
                            "value" : ""  
                        }  
                    }  
                }  
            }  
        },

打包时,包名写的也是 com.example.B,但是打包失败:
报错信息如下:

Appid: XXXXXX  
  
FAILURE: Build failed with an exception.  
  
* What went wrong:  
Execution failed for task ':app:processReleaseAGCPlugin'.  
> ERROR: Failed to verify AGConnect-Config '/client/package_name', expected: 'com.example.B', but was: 'com.example.A'  
  
* 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:processReleaseAGCPlugin'.

我把原生插件删除、重新添加再次打包。尝试了2次,均报 expected: 'com.example.B', but was: 'com.example.A' 这个错误。

2022-12-07 14:32 负责人:无 分享
已邀请:

要回复问题请先登录注册