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

标签 java android linux security adb

启动 activity 时出错,不幸的是,我假设它与项目没有严格连接,因为应用程序在 genymotion 模拟器上启动,但没有物理设备。

当我在连接真实设备的情况下运行 adb devices 时,我得到:

List of devices attached 
0009215b1eef4f  device

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

问候

最佳答案

只需添加:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

AndroidManifest.xml 标签中:

<activity>

希望对你有帮助

关于java.lang.SecurityException : Permission Denial: starting Intent { act=android. intent.action.MAIN cat=[android.intent.category.LAUNCHER],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26492301/

相关文章:

java - 有没有办法将多种数据类型存储在单个哈希表变量中?

java - Java是按引用返回还是按值返回

Android 多文件选择器/选择器对话框

linux - 在 beaglebone 上与 Linux 中的自定义相机接口(interface)

c - 如何在c中读取内核日志消息?

java - 使用 Java SE 的桌面应用程序中 GUI 的最佳工具或解决方案

java - Phonegap vs native on android 性能测试

Android如何使用复选框识别 ListView 中的项目

linux - 如何使用多线程进行 zlib 压缩(相同输入源)

java - java中的处理代码可以作为GUI应用程序在处理IDE之外运行吗?