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

12

7

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

Ultrafilter answered 15/9, 2014 at 12:3 Comment(5)
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.Keys
I did that but it doesnt work.Ultrafilter
Did You spot the section of code, where it crashes ? And what are the details?Keys
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.Ultrafilter
Yes, but expand the details please.Keys
U
13

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.
Ultrafilter answered 17/9, 2014 at 15:26 Comment(1)
WARNING: Following those steps will remove all your preferences, run configurations, etc.Daytoday
A
1

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

Arda answered 27/9, 2014 at 5:31 Comment(0)
B
1

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

Beautiful answered 6/12, 2014 at 19:33 Comment(0)
E
1

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.

Econah answered 16/12, 2014 at 15:38 Comment(0)
O
1

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.

Oscillatory answered 17/1, 2019 at 12:15 Comment(1)
It also happens with missing JRE in same "Run Configurations"Redbird
C
0

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.

Catholicize answered 6/8, 2015 at 13:4 Comment(0)
C
0

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.

Convection answered 23/9, 2016 at 17:30 Comment(0)
M
0

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.

Michaelemichaelina answered 7/12, 2016 at 14:23 Comment(0)
S
0

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

Salify answered 5/9, 2019 at 3:12 Comment(0)
R
0

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

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

Ruffian answered 3/8, 2020 at 10:30 Comment(0)
P
0

In My case issue was java version in updating it to correct (11->1,8) and doing maven update helped me

Prokofiev answered 14/10, 2021 at 11:32 Comment(0)
F
0

ISSUE : Error: Could not find or load main class com.pluralsight.fundamentals.FundamentalsApplication Caused by: java.lang.ClassNotFoundException: com.pluralsight.fundamentals.FundamentalsApplication

ANSWER:

  1. Open cmd (Command prompt)
  2. Check java version (java -version)
  3. Open POM.xml and check java version there
  4. You are getting this error, that means java version is mismatched.
  5. Change the java version in POM.xml (example: if java 11 , add it as 1.11 in pom.xml file)
  6. Example: <java.version>1.11</java.version>
  7. Update Maven by right click on the on the project in eclipse
  8. Now it will work and the error will be vanished :)
Feldman answered 16/5, 2022 at 17:49 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.