启动 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/