Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

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

List of devices attached 
0009215b1eef4f  device

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

Regards

like image 236
Jacob Avatar asked Oct 21 '14 17:10

Jacob


2 Answers

Simply add:

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

on AndroidManifest.xml into the tag:

<activity>

Hope it helps

like image 181
Kike Rios Avatar answered Sep 28 '22 07:09

Kike Rios


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..

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

like image 27
Jacob Avatar answered Sep 28 '22 06:09

Jacob