android能打印出推送日志 但手机没显示通知

标签: #<Tag:0x00007f659193e650>

2019-04-04 13:08:19.777 23933-23933/com.example.asus.newninefeel D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.0.0, buildId:319
2019-04-04 13:08:19.784 23933-23933/com.example.asus.newninefeel D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
2019-04-04 13:08:19.801 23933-23933/com.example.asus.newninefeel D/JIGUANG-JCore: [AndroidUtil] action:checkValidManifest
2019-04-04 13:08:19.822 23933-23933/com.example.asus.newninefeel D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.0.0, buildId:114
2019-04-04 13:08:19.836 23933-23933/com.example.asus.newninefeel D/JIGUANG-JCore: [JCoreGlobal] metadata: appKey - e1eecfeccaab9e7d73699db5
2019-04-04 13:08:19.837 23933-23933/com.example.asus.newninefeel D/JIGUANG-JCore: [JCoreGlobal] metadata: channel - developer-default
2019-04-04 13:08:20.847 23933-24048/com.example.asus.newninefeel D/JIGUANG-JCore: [ARunAction] pkg:com.example.asus.newninefeel
2019-04-04 13:08:20.847 23933-24048/com.example.asus.newninefeel D/JIGUANG-JCore: [ARunAction] Bundle[{action=cn.jpush.android.intent.REPORT, report.extra.info=, report=crash_log, sdktype=JCORE}]
2019-04-04 13:08:20.852 23933-24048/com.example.asus.newninefeel I/JIGUANG-JCore: [ReportHelper] periodTasks…
2019-04-04 13:08:20.856 23933-24048/com.example.asus.newninefeel D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:23933
2019-04-04 13:08:20.858 23933-24203/com.example.asus.newninefeel I/JIGUANG-JCore: [NetworkingClient] Begin to run in ConnectingThread - id:19502
2019-04-04 13:08:20.859 23933-24048/com.example.asus.newninefeel D/JIGUANG-JCore: [JiguangTcpManager] Action - restartNetworkingClient, pid:23933
2019-04-04 13:08:20.860 23933-24048/com.example.asus.newninefeel D/JIGUANG-JCore: [JiguangTcpManager] isRunning:true
2019-04-04 13:08:20.878 23933-24202/com.example.asus.newninefeel W/JIGUANG-JCore: [WakeUpJiGuang] Can’t start other push services duo to exception:Not allowed to start service Intent { flg=0x20 cmp=com.Qunar/com.mqunar.llama.channel.MyDaemonService }: app is in background uid null
2019-04-04 13:08:20.880 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [ConnectingHelper] To get sis - host:s.jpush.cn, port:19000, selection:0
2019-04-04 13:08:21.941 23933-23933/com.example.asus.newninefeel D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.0.0, buildId:319
2019-04-04 13:08:22.284 23933-24234/com.example.asus.newninefeel W/JIGUANG-JCore: [HttpUtils] http post IOException error:java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
2019-04-04 13:08:22.284 23933-24234/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:3005
2019-04-04 13:08:22.605 23933-24234/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200
2019-04-04 13:08:23.883 23933-24203/com.example.asus.newninefeel W/JIGUANG-JCore: [ConnectingHelper] Get sis info error - sisHost:s.jpush.cn
java.lang.Exception: Failed to resolve host dns - s.jpush.cn
at cn.jiguang.c.d.b.a(Unknown Source:142)
at cn.jiguang.c.d.b.a(Unknown Source:6)
at cn.jiguang.c.b.g.run(Unknown Source:83)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
2019-04-04 13:08:23.885 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [ConnectingHelper] To get sis - host:sis.jpush.io, port:19000, selection:1
2019-04-04 13:08:23.965 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [ConnectingHelper] SIS Receiving…
2019-04-04 13:08:23.998 23933-24203/com.example.asus.newninefeel I/JIGUANG-JCore: [ConnectingHelper] Get sis info succeed with host: sis.jpush.io
2019-04-04 13:08:24.000 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [ConnectingHelper] Open connection with main - ip:121.46.20.57, port:7002
2019-04-04 13:08:24.060 23933-24203/com.example.asus.newninefeel I/JIGUANG-JCore: [ConnectingHelper] Succeed to open connection - ip:121.46.20.57, port:7002
2019-04-04 13:08:24.065 23933-24203/com.example.asus.newninefeel I/JIGUANG-JCore: [ConnectingHelper] Login with - juid:24500955735, appKey:e1eecfeccaab9e7d73699db5, sdkVersion:196608, analyticsVersion:0 ,shareVersion:0
2019-04-04 13:08:24.129 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [JCommands] Action - receivedCommand - cmd:1
2019-04-04 13:08:24.132 23933-24203/com.example.asus.newninefeel I/JIGUANG-JCore: [ConnectingHelper] Login succeed - sid:2049, serverTime;1554354504000
2019-04-04 13:08:24.132 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [ConnectingHelper] Action - sendServerTimer
2019-04-04 13:08:24.163 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Network listening…
2019-04-04 13:08:24.163 23933-24199/com.example.asus.newninefeel D/JIGUANG-JCore: [JiguangTcpManager] Action - onLoggedIn - connection:-960548160
2019-04-04 13:08:24.163 23933-24199/com.example.asus.newninefeel D/JIGUANG-JCore: [ConnectingHelper] Action - sendConnectionChanged
2019-04-04 13:08:24.166 23933-24199/com.example.asus.newninefeel I/JIGUANG-JCore: [ReportHelper] periodTasks…
2019-04-04 13:08:26.108 23933-23933/com.example.asus.newninefeel D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.0.0, buildId:319
2019-04-04 13:08:39.181 23933-24199/com.example.asus.newninefeel D/JIGUANG-JCore: [JiguangTcpManager] Send heart beat
2019-04-04 13:08:39.265 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:36, connection:-960548160, pkg:com.example.asus.newninefeel
2019-04-04 13:08:39.271 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Network listening…
2019-04-04 13:08:39.271 23933-24199/com.example.asus.newninefeel D/JIGUANG-JCore: [JiguangTcpManager] Action - onHeartbeatSucceed - connection:-960548160
2019-04-04 13:08:54.006 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:308, connection:-960548160, pkg:com.example.asus.newninefeel
2019-04-04 13:08:54.019 23933-24203/com.example.asus.newninefeel D/JIGUANG-JPush: [JPushDataAction] response:[MessagePush] - msgType:0, msgId:47287801455331771, msgContent:com.example.asus.newninefeel
e1eecfeccaab9e7d73699db5
{“ad_id”:“47287801455331771”,“m_content”:{“ad_t”:0,“n_alert_type”:7,“n_category”:"",“n_content”:“111 232”,“n_extras”:{},“n_flag”:1,“n_priority”:0,“n_style”:0,“n_title”:""},“n_builder_id”:0,“n_only”:1,“show_type”:4} - JResponse{code=0}
2019-04-04 13:08:54.036 23933-24203/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Network listening…
2019-04-04 13:08:54.048 23933-24745/com.example.asus.newninefeel D/JIGUANG-JPush: [NotificationHelper] running flag:true
2019-04-04 13:08:54.060 23933-24745/com.example.asus.newninefeel D/JIGUANG-JPush: [NotificationHelper] Send push received broadcast to developer defined receiver
2019-04-04 13:08:54.381 23933-24234/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200
2019-04-04 13:08:54.749 23933-24234/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200

以上日志信息 可以看出 打印出了日志 但是手机没显示通知

检查客户端的通知栏等设置,第三点

你好 我这边排查了您所说的第三条 确定权限是允许的 并且isPushStopped 返回false

2019-04-04 13:34:12.410 14597-14804/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:308, connection:-826129920, pkg:com.example.asus.newninefeel
2019-04-04 13:34:12.416 14597-14804/com.example.asus.newninefeel D/JIGUANG-JPush: [JPushDataAction] response:[MessagePush] - msgType:0, msgId:67554001284052675, msgContent:com.example.asus.newninefeel
e1eecfeccaab9e7d73699db5
{“ad_id”:“67554001284052675”,“m_content”:{“ad_t”:0,“n_alert_type”:7,“n_category”:"",“n_content”:“测试 一下”,“n_extras”:{},“n_flag”:1,“n_priority”:0,“n_style”:0,“n_title”:""},“n_builder_id”:0,“n_only”:1,“show_type”:4} - JResponse{code=0}
2019-04-04 13:34:12.436 14597-14804/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Network listening…
2019-04-04 13:34:12.445 14597-15291/com.example.asus.newninefeel D/JIGUANG-JPush: [NotificationHelper] running flag:true
2019-04-04 13:34:12.467 14597-15291/com.example.asus.newninefeel D/JIGUANG-JPush: [NotificationHelper] Send push received broadcast to developer defined receiver
2019-04-04 13:34:12.957 14597-14833/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200
2019-04-04 13:34:13.678 14597-14833/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200
2019-04-04 13:35:29.760 14597-14833/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200
2019-04-04 13:35:59.953 14597-14804/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:308, connection:-826129920, pkg:com.example.asus.newninefeel
2019-04-04 13:35:59.970 14597-14804/com.example.asus.newninefeel D/JIGUANG-JPush: [JPushDataAction] response:[MessagePush] - msgType:0, msgId:9007204625962801, msgContent:com.example.asus.newninefeel
e1eecfeccaab9e7d73699db5
{“ad_id”:“9007204625962801”,“m_content”:{“ad_t”:0,“n_alert_type”:7,“n_category”:"",“n_content”:“你好”,“n_extras”:{},“n_flag”:1,“n_priority”:0,“n_style”:0,“n_title”:""},“n_builder_id”:0,“n_only”:1,“show_type”:4} - JResponse{code=0}
2019-04-04 13:35:59.987 14597-14804/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Network listening…
2019-04-04 13:35:59.996 14597-16196/com.example.asus.newninefeel D/JIGUANG-JPush: [NotificationHelper] running flag:true
2019-04-04 13:36:00.025 14597-16196/com.example.asus.newninefeel D/JIGUANG-JPush: [NotificationHelper] Send push received broadcast to developer defined receiver
2019-04-04 13:36:00.491 14597-14833/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200
2019-04-04 13:36:01.054 14597-14833/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200
2019-04-04 13:38:18.743 14597-14833/com.example.asus.newninefeel D/JIGUANG-JCore: [HttpHelper] status code:200
2019-04-04 13:38:19.001 14597-14802/com.example.asus.newninefeel I/JIGUANG-JCore: [ReportHelper] periodTasks…
2019-04-04 13:38:19.098 14597-14801/com.example.asus.newninefeel D/JIGUANG-JCore: [JiguangTcpManager] Send heart beat
2019-04-04 13:38:19.190 14597-14804/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Received bytes - len:36, connection:-826129920, pkg:com.example.asus.newninefeel
2019-04-04 13:38:19.192 14597-14801/com.example.asus.newninefeel D/JIGUANG-JCore: [JiguangTcpManager] Action - onHeartbeatSucceed - connection:-826129920
2019-04-04 13:38:19.193 14597-14804/com.example.asus.newninefeel D/JIGUANG-JCore: [NetworkingClient] Network listening…

以上是换个手机后的日志 同样是未显示通知

我用的是官网jcenter()
以下是配置的相关操作
apply plugin: ‘com.android.application’

android {
compileSdkVersion 28
defaultConfig {
applicationId “com.example.asus.newninefeel”
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName “1.0”
testInstrumentationRunner “android.support.test.runner.AndroidJUnitRunner”
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
ndk{
//选择要添加的对应cpu类型的.so库
abiFilters ‘armeabi’, ‘armeabi-v7a’, ‘armeabi-v8a’
// 还可以添加 ‘x86’, ‘x86_64’, ‘mips’, ‘mips64’
}
manifestPlaceholders = [
JPUSH_PKGNAME : applicationId,
JPUSH_APPKEY : “e1eecfeccaab9e7d73699db5”, //JPush上注册的包名对应的appkey.
JPUSH_CHANNEL : “developer-default”, //暂时填写默认值即可.
]
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
}
}

dataBinding {
enabled = true
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

}

dependencies {
implementation ‘cn.jiguang.sdk:jpush:3.0.0’ // 此处以JPush 3.0.0 版本为例。
implementation ‘cn.jiguang.sdk:jcore:1.0.0’ // 此处以JCore 1.0.0 版本为例。

implementation ‘com.android.support:multidex:1.0.3’
// implementation ‘com.kyleduo.switchbutton:library:2.0.0’
// implementation ‘com.android.support:multidex:1.0.0’

implementation fileTree(include: [’*.jar’], dir: ‘libs’)
implementation ‘com.android.support:appcompat-v7:28.0.0’
//系统依赖
implementation ‘com.android.support.constraint:constraint-layout:1.1.3’
// 约束布局
implementation ‘com.android.support:recyclerview-v7:28.0.0’
// recyclerview
implementation ‘com.android.support:support-vector-drawable:28.0.0’
// 自带的
testImplementation ‘junit:junit:4.12’
// 自带的
androidTestImplementation ‘com.android.support.test:runner:1.0.2’
// 自带的
androidTestImplementation ‘com.android.support.test.espresso:espresso-core:3.0.2’
// 自带的
implementation ‘com.google.code.gson:gson:2.8.5’
// 解析json
implementation ‘com.squareup.okhttp3:okhttp:3.11.0’
// 网络请求
implementation ‘com.android.support:design:28.0.0’
// 自带的
implementation ‘com.android.support:cardview-v7:28.0.0’
// 自带的
implementation ‘com.scwang.smartrefresh:SmartRefreshLayout:1.0.4’
// 下拉刷新,可以自己写
implementation ‘com.scwang.smartrefresh:SmartRefreshHeader:1.0.4’
// 下拉刷新,可以自己写
implementation ‘com.jph.takephoto:takephoto_library:4.0.3’
// 上传头像 可以自己写。。
implementation ‘com.yanzhenjie:permission:1.0.5’
// 权限申请,可以自己写
implementation ‘com.youth.banner:banner:1.4.10’
// 轮播图,可以自己写。。
implementation ‘com.github.bumptech.glide:glide:3.7.0’
// 导入支付宝
implementation(name: ‘alipaySdk-15.6.0-20190226104053’, ext: ‘aar’)

// 图片加载
//annotationProcessor ‘com.github.bumptech.glide:compiler:4.3.1’
implementation project(’:easeui’)
}

这跟你怎么集成没关系,现在是消息收到了没展示,一般就是手机上的设置问题,得看有没有消息盒子,不重要的通知等等

Can’t start other push services duo to exception:Not allowed to start service Intent { flg=0x20 cmp=com.Qunar/com.mqunar.llama.channel.MyDaemonService }: app is in background uid null

另外,这个警告,你升级下 SDK 版本到最新的
https://docs.jiguang.cn/jpush/updates/#jpush-android-sdk-v320

你好 我原来试过去提升版本到3.20 可是提升玩之后 程序 无法正常启动 在查找资料后 是由于版本原因 但是按网上更改后无法解决


image

日志给完整一点,你 JCore 对应升级了没有

感谢 问题解决了 就是版本的问题 极光的客服真的好 感谢您的耐心 贵公司有这种客服团队,真是好。

1赞