加上初始化语句就停止运行,但app还能运行


(小强) #1

加上初始化语句就停止运行,但app还能运行,还能收到通知,但是每次APP启动,都弹出来已停止运行的弹框,关闭弹框以后能正常运行,屏蔽掉 JPushInterface.init(this);就不会,咋回事啊???


#2

1、SDK 版本号,手机机型和系统
2、安装极光官方 demo 是否有问题
3、提供你的客户端log,完整的从初始化开始提供


(小强) #3
06-07 13:43:44.453 9102-9102/com.jlncjf.gwadar D/MyApplication: --------------------------
06-07 13:43:44.453 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:463]: [EMClient] emchat manager login in process:9102 threadName:pool-3-thread-2 ID:32953
06-07 13:43:44.463 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:469]: EMDatabase::open 
    [2018/06/07 13:43:44:470]: EMDatabase::getDBVersion: 5
06-07 13:43:44.463 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:470]: performMigrationIfNecessary current DB version: 5
    [2018/06/07 13:43:44:471]: autoLogin
    [2018/06/07 13:43:44:471]: EMSessionManager::login(): houjinmin
    [2018/06/07 13:43:44:471]: EMDNSManager::getCurrentHost: type: 2
    [2018/06/07 13:43:44:472]: EMSessionManager::checkDNS()
    [2018/06/07 13:43:44:472]: valid_time: 1528544748427
    [2018/06/07 13:43:44:472]: current time: 1528350224472
    [2018/06/07 13:43:44:473]: validBefore: 1528544748427
    [2018/06/07 13:43:44:473]: EMSessionManager::checkDNS(), use local dnsconfig file
    [2018/06/07 13:43:44:473]: getDnsListFromLocal()
    [2018/06/07 13:43:44:474]: EMDNSManager::parseDnsServer: 
06-07 13:43:44.483 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:488]: ranomOffer
    [2018/06/07 13:43:44:488]: checkDNS finished
    [2018/06/07 13:43:44:488]: EMDNSManager::getHost: type: 2
    [2018/06/07 13:43:44:489]: current host: domain: 47.93.69.170 port: 12006
    [2018/06/07 13:43:44:492]: token is valid
    [2018/06/07 13:43:44:492]: token status:  0
    [2018/06/07 13:43:44:493]: setServer: 47.93.69.170
    [2018/06/07 13:43:44:493]: Calling connect...
    [2018/06/07 13:43:44:494]: doConnect()
    [2018/06/07 13:43:44:494]: current connectState: 0
    [2018/06/07 13:43:44:494]: log: level: 0, area: 1, ChatClient::connect() 
06-07 13:43:44.493 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:495]: log: level: 0, area: 2, getSocket(): 31
    [2018/06/07 13:43:44:501]: log: level: 1, area: 2, connectSocket(): start to connecting...
06-07 13:43:44.503 9102-9102/com.jlncjf.gwadar D/JIGUANG-JPush: [JPushInterface] action:init - sdkVersion:3.1.3, buildId:405
06-07 13:43:44.513 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:519]: log: level: 1, area: 2, connectSocket(): connect finished
    [2018/06/07 13:43:44:520]: log: level: 2, area: 2, connectSocket() OK: fd: 31 Client:192.168.137.208:53948 Server: 47.93.69.170:12006
    [2018/06/07 13:43:44:520]: log: level: 1, area: 1, SEND:
    { verison : MSYNC_V1, guid : kanjiantechnology001#gwadar_houjinmin@easemob.com/mobile, auth : ***, compress_algorimth : 0, command : PROVISION, encrypt_type : [ 0 ], payload : { os_type : 1, version : 3.4.1, device_uuid : 7ee9f03e-fcf7-33ef-83a6-bbee71ebd3ef, is_manual_login : false, device_name : samsungSM-N9008, auth : *** } }
    [2018/06/07 13:43:44:521]: Calling connect result: 1
06-07 13:43:44.513 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:521]: start startReceive()
06-07 13:43:44.533 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:539]: log: level: 1, area: 1, RECV:
    { verison : MSYNC_V1, command : PROVISION, payload : { status : { error_code : 0 }, resource : android_7ee9f03e-fcf7-33ef-83a6-bbee71ebd3ef } }
    [2018/06/07 13:43:44:539]: EMSessionManager::onConnect()
    [2018/06/07 13:43:44:539]: log: level: 1, area: 1, SEND:
    { verison : MSYNC_V1, compress_algorimth : 0, command : UNREAD, encrypt_type : [ 0 ], payload : {  } }
    [2018/06/07 13:43:44:539]: notify state change to connection listener
    [2018/06/07 13:43:44:540]: EMConnectionListener onConnected
    [2018/06/07 13:43:44:540]: [im login time] 0: 0: 47
    [2018/06/07 13:43:44:540]: login return: 0
06-07 13:43:44.543 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:546]: log: level: 1, area: 1, RECV:
    { verison : MSYNC_V1, command : UNREAD, payload : { status : { error_code : 0 }, timestamp : 1528350221521 } }
    [2018/06/07 13:43:44:546]: log: level: 0, area: 1, NO unread queue, an response for ping?
06-07 13:43:44.603 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:616]: [EMClient] on new login created
06-07 13:43:44.613 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:622]: [EMDBManager] initDB : houjinmin
    [2018/06/07 13:43:44:623]: [EMDBManager] created chatdb for :houjinmin
06-07 13:43:44.623 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:632]: [EMDBManager] close msg db
06-07 13:43:44.893 9102-9102/com.jlncjf.gwadar D/JIGUANG-JCore: [JCoreGlobal] action:init - sdkVersion:1.2.1, buildId:188
06-07 13:43:44.923 9102-9102/com.jlncjf.gwadar D/JIGUANG-JCore: [AndroidUtil] action:checkValidManifest
06-07 13:43:44.933 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:942]: [smart ping] change smart ping state from : EMReady to : EMEvaluating
06-07 13:43:44.933 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:943]: [smart ping] reset interval...
    [2018/06/07 13:43:44:943]: [smart ping] change smart ping state from : EMEvaluating to : EMEvaluating
06-07 13:43:44.953 9102-9102/com.jlncjf.gwadar D/JIGUANG-JCore: [JCoreServiceUtils] set Push/Alarm Receiver enabled
06-07 13:43:44.953 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:961]: [smart ping]  onConnectred ...
    [2018/06/07 13:43:44:962]: [smart ping] reset interval...
06-07 13:43:44.963 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:44:969]: [net] wifi is connected
06-07 13:43:45.003 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:009]: [EMClient] do start service: context:com.jlncjf.gwadar.MyApplication@152af95
06-07 13:43:45.173 9102-9102/com.jlncjf.gwadar D/JIGUANG-JPush: [AndroidUtil] action:checkValidManifest
06-07 13:43:45.183 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:186]: [smart ping] prevWifi:false isWifi:true prevWIFISSID: SSID:"hjkl"
06-07 13:43:45.183 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:190]: [net] wifi is connected
    [2018/06/07 13:43:45:191]: [smart ping] change smart ping state from : EMEvaluating to : EMEvaluating
    [2018/06/07 13:43:45:194]: [smart ping] reset currentInterval:02:00:000
    [2018/06/07 13:43:45:194]: [smart ping] schedule next alarm
06-07 13:43:45.193 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:197]: [smart ping] current heartbeat interval : 02:00:000 smart ping state : EMEvaluating
06-07 13:43:45.203 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:208]: EMSessionManager::checkDNS()
    [2018/06/07 13:43:45:208]: isEnabledGCM: 0
06-07 13:43:45.203 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:208]: [EMPushHelper] FCM is enabled : false
    [2018/06/07 13:43:45:212]: [EMPushHelper] mipush available : false
    [2018/06/07 13:43:45:212]: restBaseUrl()
    [2018/06/07 13:43:45:212]: EMDNSManager::getCurrentHost: type: 3
    [2018/06/07 13:43:45:212]: EMSessionManager::checkDNS()
    [2018/06/07 13:43:45:213]: EMDNSManager::getHost: type: 3
06-07 13:43:45.213 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:213]: current host: domain: a6.easemob.com port: 443
06-07 13:43:45.213 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:221]: [EMPushHelper] send device token to server, token = ,url = https://a6.easemob.com:443/kanjiantechnology001/gwadar/users/houjinmin,notifier_name = 
    [2018/06/07 13:43:45:222]: token is valid
    [2018/06/07 13:43:45:222]: [HttpClientManager] try send request, request url: https://a6.easemob.com:443/kanjiantechnology001/gwadar/users/houjinmin with number: 0
06-07 13:43:45.213 9102-9102/com.jlncjf.gwadar I/JIGUANG-JPush: [PluginPlatformsInterface] whichPlatform - 0
06-07 13:43:45.223 9102-9148/com.jlncjf.gwadar D/ONE SDK: [2018/06/07 13:43:45:227]: [net] has wifi connection
06-07 13:43:45.233 9102-9102/com.jlncjf.gwadar I/JIGUANG-JPush: [PluginPlatformsInterface] isIntegrateFCM -false
06-07 13:43:45.233 9102-9102/com.jlncjf.gwadar D/MyApplication: --------------------------

(小强) #4

sdk版本
implementation ‘cn.jiguang.sdk:jpush:3.1.3’
implementation ‘cn.jiguang.sdk:jcore:1.2.1’

手机型号samsung SM-N9008


#7

你在代码里面搜索 已停止运行 这句话的 toast 看一下,是哪里会导致弹出这个弹框?

直接运行极光官方 demo 看是否有问题。
官网-应用信息-推送设置-Android-下载 demo,或者 SDK 包里面也有 example 文件夹。


(小强) #8

demo有没有安装包啊,我的是studio,你们的是eclipse的,已停止运行 这句话是系统弹出来的,不是我自己弹的


(小强) #10

大哥,看log没看出什么问题来吗?


#11

demo 是支持 AS 的,请以 module 导入


(小强) #13

给个demo安装包不行吗,我试试,导入项目一堆问题


#16

JPush SDK Demo(7).apk (281.9 KB)


(小强) #17

你的demo就不报错,但是集成方式不一样,我studio是用的implementation ‘cn.jiguang.sdk:jpush:3.1.3’
implementation 'cn.jiguang.sdk:jcore:1.2.1’集成,这个demo是本地库集成的吧?我发给你的log没看出问题来?


#18

你上面提供的 log 并没有什么问题。

集成极光的时候,把 implementation 换成 api 或者 compile 试试呢?


(小强) #19

也不行,我的小米手机就没问题,他的就报错


#20

如果说极光 SDK 有问题的话,你用我们的 demo 又没有问题,而且你的描述是弹出了「已停止运行」但实际上并不影响 App 的运行。

自动集成的时候相关的 so 文件加全了没有呢?都加上看看

或者你集成的时候采用手动集成的方式呢?demo是手动集成,且加上了所有的 so 文件的

这可能与手机本身也有点关系,在网上搜索到不少三星手机弹出停止运行的情况。