Permission Denial: starting Intent 解决办法 .

来源:互联网 发布:vscode在插件 编辑:程序博客网 时间:2024/06/07 14:39
最近在调试程序的时候经常出现ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.xxxxx.xxxxx/.ui.xxxxxxx } from null (pid=-1, uid=-1) requires null的问题,困扰我好几天了,一开始只是认为权限的问题,跟了好久一直没有解决。 

后来看到: 

The java.lang.SecurityException you are seeing is because you may enter two entries pointing to same activity. Remove the second one and you should be good to go. 

才发现这个Activity在Manifest文件里写了两份,去掉一份后,终于可以正常运行了。 

注:此问题还会引起,在手机端点击程序图标时,会提示程序未安装在手机上。 



http://hi.baidu.com/b__a__i__d__u/blog/item/645fe45c1537a05afbf2c0fa.html
原创粉丝点击