I had same problem,then(as Jeff Schultz said here) I tried:
Run As -> Android Application
and problem solved.But I don't know the reason that causes this problem.I hope this help you!
Same thing happened to me. I created a TestActivity and I guess it had a public static void main(String args) function. I went into the properties and then the Run/Debug and deleted TestActivity and it worked just fine.
I had a similar problem on the
fatal error: Invalid layout of preloaded class with Kepler Service Release 1 using windows 7.
Project -> Properties -> Java Build Path -> Order and Export --> check mark any unchecked library or Android version and then hit OK. Then run as Android application.
I had the same problem, solved it by:
Click on left on "Android Application"-> Button on top "New";
then type in a name and "Browse" the Project -> works!
You should make a run configuration for an "Android application". If you make it for "Java Application" by mistake this error will show.
This happened to me after:
- Inserting a class in the Android Application project where I had forgotten to remove
public static void main(String args)function. (Had previously performed a quick test of the class).
- Tried to run the Application while I had opened and focused the above class on Eclipse editor.
The funny thing was that, after the Eclipse error, no matter on what class I switched the focus on, when I was trying to run the application again, I was stuck with the same error.
Inspired by Odyr Sohn solution, I managed to solve the problem (from Project->Properties->Run/Debug Settings deleting the faulty Launch configuration), but as soon as I was trying to run the application from this class, the same thing was happening again. When I removed
public static void main(String args) function from the class, the problem was solved for good.
In case of an Android project, you have to remove Android Lib from the launch configuration for that specific class. Use the "walkthrough" below as a guide.
- Project->Properties->Run/Debug Settings;
- Select your Class and click "Edit";
- Open the tab "Classpath" and remove Android Lib from "Bootstrap Entries";
- Apply everything and Run the class again.
- Fatal Error: Invalid Layout of java.lang.String at value
- A fatal error has been detected by the Java Runtime Environment: Internal Error ; Error: ShouldNotReachHere()
- Ubuntu, JavaFX, A fatal error has been detected by the Java Runtime Environment
- "Cannot switch on a value of type String for source level below .." error in Eclipse
- Eclipse can't start on Linux: Java Fatal Error
- Java eclipse String Error
- String index out of range error in java method
- "[Microsoft][ODBC Driver Manager] Invalid string or buffer length" error
- A fatal error has been detected by the Java Runtime Environment::When Eclipse IDE interfacing with Arduino
- Error using "for" to generate 100 random numbers in java eclipse and compare them to the user value
- "A fatal error has been detected by the Java Runtime Environment: " when running Java Project on JRE(1.8)
- Invalid Thread Access error when changing Java SWT Label
- Java error: Invalid layout of preloaded class
- Eclipse - Android - Invalid layout of java.lang.String at value
- How to add the java variable value in the Configuration util String -
- Getting "A fatal error has been detected by the Java Runtime Environment:" when trying to run JavaFX code
- A fatal error has been detected by the Java Runtime Environment:
- Java File input error java.io.StreamCorruptedException: invalid stream header: 22427275
- Invalid layout of java.lang.String at value
- How many java files are using string value from String xml
- How to manipulate value from a return string in Java
- Fatal Exception, java lang null pointer exception
- "Error: Could not create the Java Virtual Machine Error: A fatal exception..." Shows error when I tried to launch Eclipse IDE 2019-06
- ERROR getting 'name' attribute: attribute is not a string value Hybrid Cordova App
- Java Heap Space error on Layout xml: GC overhead limit exceeded
- Eclipse - A fatal error has been detected by the Java Runtime Environment:
- "Invalid Column id" error when counting unique value in Java
- Invalid escape sequence Eclipse String error
- Paste a multi-line Java String in Eclipse
- How to solve could not create the virtual machine error of Java Virtual Machine Launcher?
More Query from same tag
- Problems in ADT 10.0.1
- How to update eclipse in command line?
- Eclipse and Git - Repositories from GitHub not available from Import menu (Projects from Git are available)
- Developing an Eclipse Plugin and adding a submenu item to navigator
- How change build target (2.2 to 2.3.3)? Or recover after trying
- display subject-predicate-object as graph using java
- Eclipse => same shortcuts as Visual Studio?
- Eclipse IDE does not run Java application after modification of module name
- How to debug with Eclipse using GNU Tools for ARM Embedded Processors?
- How to create a custom interface in Eclipse
- Eclipse: Is it possible to mix SWT and JavaFX based plugins?
- What does eclipse do when you inspect variables (while debugging)
- HTTP Status 404 - The requested resource (/BookStore/index.html) is not available
- Emacs Style "artist-mode" for Eclipse?
- Problems with egit connecting to a git repository on a godaddy shared account
- Hide perspective in eclipse with xml
- Should I use upper-case naming to declare java constant variables?
- Effective ways to deploy rcp applications outside eclipse
- Shared preferences between classes (static)?
- Eclipse connection refused when remote debugging
- How to have ranked most used files in eclipse
- Can I restore the files that I have deleted in Eclipse?
- Pydev/OpenCV: Installation Errors
- adding keylistener into java. implement keylistener class restriction?
- XML not validating in Eclipse with external DTD
- Eclipse plugin to run specific method
- Snap window to appear adjacent to other tabs
- Memory Analyzer (MAT) plugin not opening heap prof in MAT Eclipse 4.1.2 automatically
- Frama-C development with eclipse: autocompletion not working in some cases
- How to convert project in "AspectJ Project" in Eclipse