java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER]
Solution 1
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
Solution 2
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
Jacob
Hi :) .. avoid this for your life quality ;) https://www.linkedin.com/in/kozlowskijakub
Updated on June 13, 2022Comments
-
Jacob almost 2 years
There is an error launching
activity
, unfortunately I assume it is not connected strictly with the project due to the fact the app launches ongenymotion
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 sufficientapi version
.Regards