Service starting has been prevented by iaware or trustsbase sInfo ServiceInfo 解决方法

Stella981
• 阅读 834

问题:

ActivityManager: Service starting has been prevented by iaware or trustsbase sInfo ServiceInfo{c50ea35 xxx.xxx.xxx.ServiceName}

问题描述,该问题再华为部分手机升级到Android 10.1之后,启动服务会遇到该问题。

解决方法:

启动的时候加个延时就可

new Handler().postDelayed(new Runnable() {
    @Override
    public void run() {
        Intent intent = new Intent(getContext() ,ServiceName.class);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            startForegroundService(intent);
        } else {
            startService(intent);
        }
    }
},1000);

所遇机型:

华为 荣耀V20  ;华为M 30;华为M6   ........

都是在升级10.1之后遇到的。其他机型正常启动都正常。

点赞
收藏
评论区
推荐文章
blmius blmius
2年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
梦
3年前
微信小程序new Date()转换时间异常问题
微信小程序苹果手机页面上显示时间异常,安卓机正常问题image(https://imghelloworld.osscnbeijing.aliyuncs.com/imgs/b691e1230e2f15efbd81fe11ef734d4f.png)错误代码vardate'2021030617:00:00'vardateT
Easter79 Easter79
2年前
tidb集群某个节点报错之:node_exporter
今天启动集群tidb时出现一个错误,是某个tikv节点报错:node\_exporter9100.service failed一个节点的问题会导致整个集群启动失败。去此节点下的日志文件中查找,发现没有什么报错原因。无奈此时只能去系统日志中查看发生了什么问题果然发现了问题Jan1615:35:05ip1723126133
Stella981 Stella981
2年前
Linux进程后台执行nohup(OpenTSDB后台运行方法)
1.问题描述OpenTSDB执行./tsdbtsd启动之后,占有控制台执行并且CtrlC后就退出了,关闭控制台同样会退出。2.解决方法(在/opt/module/opentsdb2.3.1/build/目录下)nohup./tsdbtsd/dev/null2&1&其中: nohup:不挂断运行 
Stella981 Stella981
2年前
JS 苹果手机日期显示NaN问题
问题描述newDate("2019122910:30:00")在IOS下显示为NaN原因分析带的日期IOS下存在兼容问题解决方法字符串替换letdateStr"2019122910:30:00";datedateStr.repl
Stella981 Stella981
2年前
SpringBoot整合Redis乱码原因及解决方案
问题描述:springboot使用springdataredis存储数据时乱码rediskey/value出现\\xAC\\xED\\x00\\x05t\\x00\\x05问题分析:查看RedisTemplate类!(https://oscimg.oschina.net/oscnet/0a85565fa
Stella981 Stella981
2年前
IE7、IE8、IE9对min
问题:    IE7、IE8、IE9对minheight不识别,其他无问题解决:   box{width:100px;height:35px;}   htmlbodybox{width:auto;height:auto;width:100px;minheight:35px;} 实例:
Easter79 Easter79
2年前
SpringBoot整合Redis乱码原因及解决方案
问题描述:springboot使用springdataredis存储数据时乱码rediskey/value出现\\xAC\\xED\\x00\\x05t\\x00\\x05问题分析:查看RedisTemplate类!(https://oscimg.oschina.net/oscnet/0a85565fa
Wesley13 Wesley13
2年前
35岁是技术人的天花板吗?
35岁是技术人的天花板吗?我非常不认同“35岁现象”,人类没有那么脆弱,人类的智力不会说是35岁之后就停止发展,更不是说35岁之后就没有机会了。马云35岁还在教书,任正非35岁还在工厂上班。为什么技术人员到35岁就应该退役了呢?所以35岁根本就不是一个问题,我今年已经37岁了,我发现我才刚刚找到自己的节奏,刚刚上路。
Stella981 Stella981
2年前
Runtime快游戏调用copyfile接口写临时文件踩坑记录
问题描述:调用copyfile接口将临时文件写入到缓存报错“nosuchfileordirectory”。问题分析:如果调用copyfile接口使用的源文件是临时文件,则该接口目前不支持此场景,需要使用save接口先将临时文件保存到本地,然后再调用copyfile接口。解决方法:var