7
votes

My android project was compiling well but suddenly it stopped launching. Then I tried to launch other projects from Project Explorer and all project threw same exception:

An internal error occurred during: "Launching Project". java.lang.NullPointerException

But console always shows everything is normal.

Android Launch!
adb is running normally.
Performing com.mmcolrev.LoginActivity activity launch

Here's screenshot of error.

enter image description here

10
Try to fix project depedencies, I had some similar problem, also occured SUDDENLY. I had to repair the project-properties and then update source files of project again, iirc.icbytes
I did that but it doesnt work.Crawler
Did You spot the section of code, where it crashes ? And what are the details?icbytes
Problem is not in my code, its in ADT. All project while launching gives same internal error. They were just working fine some moment ago, before first time this error showed up.Crawler
Yes, but expand the details please.icbytes

10 Answers

12
votes

If anyone face this problem, first keep in mind that error is not in your code but due to some internal issue in eclipse ADT. I don't know exact problem but luckily found way to solve it. If you ever encounter this error follow steps below:

  1. Exit Eclipse.
  2. Go to Android workspace.
  3. Locate .metadata folder(make sure you set hidden folder visibility on).
  4. Delete .metedata folder.
  5. Start Eclipse(you will notice project explorer is empty, don't panic) and import all your projects.
1
votes

Removing Gen/R.java and restarting eclipse, worked for me.

1
votes

This is a cause of AVD is not picked because you might delete it or it is not picked up correctly ... in other words deployment target is not specified or it has some problem in picking up a device.

To Resolve this:

  • Right click your project and choose "Properties"
  • From "Run/Debug" Settings, Highlight over your application name then hit "Edit..."
  • In "Target" tab, you have to choose a virtual device to be picked automatically under option named "Automatically pick compatible device..."
    • to avoid such prompt you could choose the first option "Always prompt to pick device" that will ask you everytime to choose or pick a device inside which you want to run your app.

If it still not working restart Eclipse

1
votes

One cause of this issue for me was that I had been updating my Android Tools with the installer. It was running in the background doing all its updates. I had forgotten about it since I had told it to do the work in the background. Then realized it had finished its work and needed a restart after the installation.

Once the upgrade / installation was done and the IDE was restarted, the Eclipse environment went back to behaving as normal.

1
votes

I had the same issue.

Non of my project in the workspace would run and I would get the same message "An internal error occurred..." and details would just say something about a Nullpointer. This happend after I did some updates and all projects in the workspace started giving the same issue.

It took me some time to find the problem:

When I go to configuration of the project (Run Configuration...) I could see that "Project" in the configuration settings was empty. So my update removed the projects from the configurations. Once I put back the project in the configuration again problem was gone.

0
votes

In my case, it was because I was running it with Debug As -> Android Native Application, while the emulator was closed (I debugging on the emulator, not on a real phone).

I needed to first start the emulator using Debug As -> Android Application, after which Debug As -> Android Native Application will work.

Close the emulator and the error re-appears. My conclusion is that Debug As -> Android Native Application won't work unless the emulator is already started.

0
votes

I had this error with an NDK project (eclipse mars, loaded an ant project) everytime i tried to lauch on the device (google tango yellowstone) using Debug As -> Android Native Application. Note, that i switched the device and changed a dependent library since the last successful build.

When i tried Debug As -> Android Application i got this message:

Re-installation failed due to different application signatures. You must perform a full uninstall of the application. WARNING: This will remove the application data!

Do you want to uninstall?

clicking OK here solved the issue, so Debug As -> Android Native Application also worked again.

0
votes

I had the same issue all of a sudden. This only happened when I ran in Debug mode, and for me what fixed it was... Run -> Remove All Breakpoints. Then I could add them back, and it ran in debug mode fine.

0
votes

To resolve this issue, I just remove the old JRE System Library and point to the new JRE System Library.

0
votes

Got the similar issue after update the project able to procced.

Right click on the project -->Maven --> Update Project