zoukankan      html  css  js  c++  java
  • 您的手机上未安装应用程序 android 点击快捷方式提示未安装程序的解决

    最近APP出现一个很奇怪的问题,在Android 4.4.2和android 4.4.3系统上点击应用的快捷方式,打不开应用,而且会提示未安装程序。
    确认了应用的MainActivity中设置了android.intent.action.MAIN,添加了INSTALL_SHORTCUT的权限,并且快捷方式的Intent是指向正确的Activity,原因就一直没找到。后来分析了一下在点击快捷方式时的log,发现了这么一句:

    W/ActivityManager: Permission Denial: starting Intent { act=android.intent.action.VIEW flg=0x10000000 cmp=com.**.plug.sdk/****.*****.main.MainActivity bnds=[34,466][170,602] } from ProcessRecord{4271c038 1109:com.miui.home/u0a17} (pid=1109, uid=10017) not exported from uid 10533
    10-19 16:35:26.058 1109-1109/? E/Launcher: Launcher does not have the permission to launch Intent { act=android.intent.action.VIEW flg=0x10000000 cmp=com.**.plug.sdk/****.*****.main.MainActivity bnds=[34,466][170,602] }. Make sure to create a MAIN intent-filter for the corresponding activity or use the exported attribute for this activity.
                                               java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW flg=0x10000000 cmp=com.**.plug.sdk/****.*****.main.MainActivity bnds=[34,466][170,602] } from ProcessRecord{4271c038 1109:com.miui.home/u0a17} (pid=1109, uid=10017) not exported from uid 10533

    log的意思是说不能app的进程不能被其他进程(这里指的是com.sec.android.app.launcher,即手机的launcher应用)调用。解决方法就是在MainActivity的属性中添加exported=”true”。

  • 相关阅读:
    oracle教程:PLSQL常用方法汇总
    CORBA_TAO的环境配置
    安装使用Sybase ASE 12.5
    Oracle数据库备份命令Exp/Imp
    30个非常流行的提示信息插件(jQuery Tooltip Plugin)
    Spring.NET学习笔记——目录(转)
    JavaScript trim函数大赏 (转)
    使用基于 Informix Dynamic Server 的 Server Studio JE
    接触 CORBA 内幕: IOR、GIOP 和 IIOP
    Oracle数据库SQL
  • 原文地址:https://www.cnblogs.com/caoxinyu/p/6647797.html
Copyright © 2011-2022 走看看