java.lang.SecurityException:Permission Denial:启动Intent {act = android.intent.action.MAIN cat = [android.intent.category.LAUNCHER] [英] java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]

查看:1426
本文介绍了java.lang.SecurityException:Permission Denial:启动Intent {act = android.intent.action.MAIN cat = [android.intent.category.LAUNCHER]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启动活动时出错,遗憾的是我认为它与项目没有严格关联,因为应用程序在 genymotion上启动模拟器,但不在物理设备上。

There is an error launching activity, unfortunately I assume it is not connected strictly with the project due to the fact the app launches on genymotion emulator, but does not on physical device.

当我运行 adb devices 时真正的连接我得到:

When I run adb devices with the real one connected i get:

List of devices attached 
0009215b1eef4f  device

AndroidManifest.xml 没有设置任何权限,设备有足够的 api版本

AndroidManifest.xml has not any permissions required set and device has sufficient api version.

问候

推荐答案

问题在于Android Studio中的Launcher选择。为了提高应用程序模块的测试速度,选择了其他Activity作为 Launcher (在运行属性中),而不是在manifest.xml中指定的。很奇怪它甚至可以在模拟器上运行..

The issue was with Launcher selection in Android Studio. To improve testing speed of application module there was selected other Activity as Launcher(in run properties) than specified in manifest.xml. Strange that it worked even on emulator..

解决方案只是将Launcher更改为 AndroidManifest.xml中的一个

The solution is simply to change the Launcher to the one set in AndroidManifest.xml

这篇关于java.lang.SecurityException:Permission Denial:启动Intent {act = android.intent.action.MAIN cat = [android.intent.category.LAUNCHER]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆