Development issue/problem:
After updating Android Studio 2.0, while the construction graph ends, I get this :
Session app : Startup error .
This prevents the application from working, but it is installed in my emulator.
This is displayed on the Run tab:
Here’s the code:
Package com.example.user.ypologismosmoriwn ;
import android.support.v7.app.App.AppCompatActivity;
import android.os.Bundle ;
The MainActivity public class expands AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
It’s just an empty slate activity, that’s all.
and the XML code is only a relative format with 4 texts and 3 checkboxes.
I’ll get this diary
Thanks to everyone who’s willing to help
How can I solve this problem?
Solution 1:
I also encountered this problem after the AS2.0 update. I’ve discovered it’s because of the immediate start. So my solution is to disable an immediate start. And it worked. To disable instant execution, you can go to the Windows Settings dialog box and then select Build, Execute, Execute > Direct Execute and clear all check boxes to disable instant execution.
This is my temporary solution that can help you. I’ll find a better way to solve this problem later.
Updated to 2016/06/06
A better solution than disabling a direct start.
Remove the folders .idea and .gradle, then click on Sync Project with Gradle Files (or via File -> Sync Project with Gradle Files), and then you can run the application normally.
Good luck.
Solution 2:
If you are using Android 7.0 and above, it is likely that the application is installed in two places (guest and admin) and that you have uninstalled it for only one user, which caused problems.
To solve this problem, go ahead:
Settings -> Applications and notifications -> Show all applications -> Find the application you are trying to install.
Then click on the menu in the upper right corner and select Delete for all users.
Run your application from Android Studio, it should work.
Solution 3:
Try reinstalling the application, it solved the error for me. The thing is, I deleted my app, but Android didn’t really delete it. I have a guest user on my phone (my sister uses it sometimes). If you remove the application from the primary user, it will still be available on the phone, but only for the guest user. Android Studio does not seem to be up to the task. I think it detects that the application is installed and does not reinstall itself for the current user, so the operating system will not be able to access the activity and run it. Nice mistake. I’ll report it.
Solution 4:
I had the same problem, the reconstruction of the project corrected the mistake for me.
build -> execute
Solution No 5:
This is the Studio 2.0+ version.
Number 206036: No local changes, no commitment from KPA.
I found a good workaround here
: just add the -r flag in the configuration, edit
, and immediately disable it.
I am waiting for the instant run function to work smoothly and without bugs, like 3 others !!!!.
Solution No 6:
The problem for me was that the application I wanted to run was already installed on my phone under a different user account. I saw it when I went to Settings->Apps to delete it. I switched to another user, uninstalled it, went back to the original user and was able to install and run the application from Android Studio without any problems.
Solution No 7:
I’ve spent many hours on this. The instant start solution was a total failure. And I didn’t miss the android.Intention.to.launch.category. I have uninstalled and reinstalled all applicable codes from Android Studio and the SDK. It’s still not working.
In the end, I think my problem was marginal material. I work on a laptop with an AMD A6-4400M processor. No hardware acceleration/virtualization tools are available. I just launched the standard Android Studio / Google emulator. It was terribly slow, and although I was finally able to see the emulator and communicate with him, I was never able to connect the emulator to Android Studio to download the MOTK.
But I’ve discovered an excellent solution.
- Uninstall all Android virtual devices and install the GenyMotion emulator (using VirtualBox).
- I already tried the GenyMotion emulators (under Linux), and it didn’t make a big difference in loading speed.
- It works exceptionally well on this Windows 10 machine. It’s pretty quick and easy to connect to Android Studio and works well when I use my applications.
- GenyMotion offers a personal device that you can use for free. Hats off to the GenyMotion team!
Answer here if someone else is stuck with this error, possibly with this cause.
Solution No 8:
I have the same problem and I solved it with this answer.
But this problem was created by myself when I tried to debug my unit tests. So I had to uncheck the Use AS settings while building in Build, Execution, Deployment > Compiler.
So in my case, disabling direct start would work. But it also works because I made the immediate implementation possible, as well as the possibility to use it during construction.
Solution No 9:
Remove adb in terminal
and reinstall the application.
I hope this helps.
Solution No 10:
Same problem, but for me the problem was that Android Studio couldn’t find my standard activity. When I specified an intent filter to capture the intent of the MAIN action, I did not specify the LAUNCHER category, which caused the wrong trigger action problem.
Good luck!
Related Tags:
error while executing: am start -n,activity class not found,splash activity does not exist,activity class not specified,android studio stuck on launching activity,how to disable instant run in android studio,error app launching activity,flutter error activity class,default activity not found,error while launching activity error type 3,android studio session error launching activity,error while executing: am start -n error type 3,starting: intent ( act=android intent action main cat=(android intent category launcher)),error activity classdoes not exist