After the Android Studio 2.0 update while the gradle build finishes I get this :
Session \'app\': Error Launching activity .
It prevents the app from starting
Just run adb uninstall <package name>
in your terminal
and reinstall the app again.
Hope it helps.
Adb also throws this error if applicationId
, package of launching activity or module name contains error
substring
I had this error because of my stupidity. In the manifest.xml I have wrongly declared two Activity as Launcher. Make sure you have only one activity as Launcher.
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".WelcomeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
I had the same error as in the headline. after I changed the version name and version code in the gradle, the sync happened and then it worked. so maybe even only sync can help sometimes.
This is issue with 2.0+ studio
Issue 206036: No local changes, not deploying APK
I found the nice workaround here just add -r flag here in edit configurations and also disabling instant
Waiting to get Instant run Feature run smoothly soon with no type 3 error more!!
Uninstall App on your real device or emulator. Then Run again. It's worked for me. I used Android Studio 2.3.3