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
I also faced this issue after I updated to AS2.0. I found that it is because of the instant run
enabled. So my solution is to disable the "instant run". and it worked. To disable "instant run", you can go to Preference Dialog
( May be Setting dialog on Windows), then select Build, Execution, Deployment
> Instant Run
, and uncheck all the checkbox to disable Instant Run
.
This is my temporary solution and it may help you. Later, I'll find a better way to this issue.
A better solution instead of disabling instant run
.
Remove the .idea
folder and .gradle
folder, then click button Sync Project with Gradle Files
(or through the menu File
-> Sync Project with Gradle Files
), after this process finished, you are able to run your app as normal.
Good Luck~
Just disable Instant Run.
Go To File >> Settings >> Build, Execute, Deployment >> Instant Run
Uncheck The Box that says Enable instant run to hot swap code/resource changes on deploy
Re-run the emulator.
I've had same issue, rebuilding project clears the error for me.
build -> rebuild project -> run
None of the existing answers helped me as I had the same app installed in my other profile. Solution -
All answers did not work for me.This error raised when I was trying to rename the app package.I have ended up creating a new project with the new package name and move my files to the new one.
I spent a whole lot of hours on this exact issue. The "instant run" fix was a total fail. And I wasn't missing the android.intent.category.LAUNCHER
I removed all applicable Android Studio and SDK code and re-installed. Still a no go.
Ultimately I think my issue was marginal hardware. I'm running on a laptop with a AMD A6-4400M processor. There is no hardware acceleration / virtualization tools available. I was just running the standard Android Studio / Google emulator. It was painfully slow, and although I was eventually able to see the emulator and interact with it, I was never able to connect the emulator to Android Studio to upload APK's.
But I did discover an awesome fix.
Answer provided here in case anybody else gets stuck with this error, possibly with this root cause.