使用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但是我确认了一下应该都配置好了。
dependencies {
implementation 'com.huawei.agconnect:agconnect-core:1.4.2.301'
}
apply plugin: 'com.huawei.agconnect'
...
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"
}
相似问题