首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >TPNS接入华为通道提示Missing HWPush Service SDK如何排查?

TPNS接入华为通道提示Missing HWPush Service SDK如何排查?

提问于 2021-01-26 14:21:50
回答 4关注 1查看 1.1K

使用Flutter插件,测试代码就是直接XgFlutterPlugin().startXg().

想要集成华为通道,提示错误信息如下。

 [OtherPushManager] USE huawei
I/TPush: [OtherPushHuaWeiImpl] other push huawei registerPush
I/TPush: [OtherPushHuaWeiImpl] Get HW SDK version: -1
W/TPush: [OtherPushHuaWeiImpl] Missing HWPush Service SDK
E/TPush: [OtherPushHuaWeiImpl] null
    java.lang.Exception
        at com.tencent.android.tpush.d.a.b.a(ProGuard:160)
        at com.tencent.android.tpush.d.d.c(ProGuard:130)
        at com.tencent.android.tpush.XGPushManager.e(ProGuard:2284)
        at com.tencent.android.tpush.XGPushManager.b(ProGuard:81)
        at com.tencent.android.tpush.XGPushManager$10.run(ProGuard:2362)
        at android.os.Handler.handleCallback(Handler.java:900)
        at android.os.Handler.dispatchMessage(Handler.java:103)
        at android.os.Looper.loop(Looper.java:219)
        at android.os.HandlerThread.run(HandlerThread.java:67)
I/TPush: [XgStat] [XgStat(9636): ProGuard:167] - 
[https://log.tpns.tencent.com/log/statistics/push]Send request(411bytes), 
content:[{"accessId":*********,"timestamp":1611632098,"token":"078993d13b00a5f8f38eb7856340c99e6f11","accessKey":"*********","sdkVersion":"1.2.2.4","et":3000,
"errCode":{"errCode":-1055,"msg":"huawei:ELS-AN00:errCode : -121 , 
errMsg : com.huawei.android.hms.agent.HMSAgenterrCode : -122 , 
errMsg : Missing HWPush Service SDKerrCode : -123 , errMsg :null"},
"errType":"inner","networkType":1,"deviceModel":"ELS-AN00"}]

看提示信息我理解是找不到华为相关sdk但是我确认了一下应该都配置好了。

  • 华为的json配置文件 agconnect-services.json
  • 模块级gradle依赖
    dependencies {
        implementation 'com.huawei.agconnect:agconnect-core:1.4.2.301'
    }
    apply plugin: 'com.huawei.agconnect'
    ...
  • 项目级gradle依赖
repositories {
        ...
        maven {url 'https://developer.huawei.com/repo/'}
        ....
    }
dependencies {
    classpath 'com.android.tools.build:gradle:4.0.2'
    classpath 'com.huawei.agconnect:agcp:1.4.2.301'
    classpath "com.tencent.android.tpns:tpnsplugin:1.7.0"
}

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档