score:64
I ran into this as well.
If you have an xml file open and click the 'Run' button, then instead of running your Android project Eclipse will try to run a transform on the xml file. It then creates a new xml file with the output of the transform and adds it to your project. Then the project will fail to run at all because of the existence of the duplicate xml file.
So make sure you don't have any duplicate xml files in your project (look at the manifest file, as well as layout files). The way I work around this is to make sure the project tree has focus (or just select a tab with a java file) before clicking 'Run'.
There is likely a better way to handle this (via a config change perhaps), but I'm pretty new to Eclipse and that's the workaround I came up with :). Hope that helps.
score:0
You should be able to have the xml file open, and build. There is an option if you right click on the project and go to android to clean up the project or reset the properties. Try that and see if it resolves the issue.
score:0
I had the same issue with same named nine-patch and normal images. Giving different names solves the issue.
score:1
I just had the same problem because I had two files of different type format, but with the same name, like: jquerymobile.css and jquerymobile.js
the solution was to rename one of the files
score:1
That will happen in the eclipse Indigo(IDE). when you are trying to run XML file instead of source pages(java files). So that will generate a file with the name of main.out.xml. so we have to delete the main.out.xml file and run the source files..
i Hope this will work..
score:2
I had same issue then trying to build project with ant. So I just cleared bin/ directory and the project was build.
score:7
Eclipce / Project / Clean ... And run your project again ...
score:18
To configure the run button to always run the previously launched application:
Eclipse -> Window -> Preferences -> Run/Debug -> Launching -> Launch Operation -> Always Launch the previously launched application
Source: stackoverflow.com
Related Query
- Android project won't build when editing a resource file
- Eclipse gives "invalid resource directory name" when I add a non-resource PNG file to my Android project
- Make Ctrl+F11 launch Android project even when on XML file
- Build C++ shared object when building Android project in Eclipse
- when i clean and build android project in eclipse it delete bin folder and gen folder contents
- How can I make Ctrl-F11 build the project when editing xml in eclipse?
- when i clean and build android project in eclipse it delete bin folder and gen folder and regenerate empty gen and bin folder
- How to exclude a lib file from build path in android without deleting from project
- Build Path issue with Java Android project when starting Eclipse
- Eclipse doesn't mark errors immediately when editing Android project
- Convert android library project to jar file with resources (libs and build folder)
- Eclipse gets NullPointerException when selecting an Android Build as a Build Target for Android Test Project
- Can't pick build target when importing Android project from existing source
- Build path error when creating android project in Eclipse
- Add custom "Open With" when I right click on a file name in Android SDK Project Explorer
- Property file always fails to load immediately when I create a new android application project
- How to build android project using ant, when i referenced some jre libs
- When I clean project in android using clean option, R.java is removed from gen file
- Eclipse: The resource is not on the build path of a Java project
- Missing AndroidManifest.xml when importing an old Android project into Eclipse
- Eclipse Run button doesn't work when Android xml file is selected
- Mac Error Create Android Project - "Errors running builder 'Android Resource Manager' on project"
- "Selection cannot be launched and there are no recent launches” when Eclipse for Android Project Dev
- "Module name is invalid" when exporting an existing eclipse project to a war file
- How do you compile an Android project into an .apk file in Eclipse without launching the emulator?
- Eclipse Build Error "A class file was not written. The project may be inconsistent, if so try refreshing this project and building it"
- Is it possible to read a raw text file without Context reference in an Android library project
- How can I build an EAR file from a Dynamic Web Project in Eclipse?
- Android logcat error: ZipFileCache: init failed when open zip file - device specific?
- Include local .json file in Eclipse Android project
More Query from same tag
- How to debug an existing project in eclipse
- Java application creates empty error.log on program start
- Connecting to an Oracle database in Ecliipse works, fails with Maven
- How to troubleshoot startup of Android emulator from inside Eclipse?
- Why eclipse need JAVA_HOME
- How to detect 3 key presses in SWT KeyListener
- Multiple eclipses for different feature set or single eclipse contains all plug-ins?
- TestNG in Eclipse: Avoid test class files in output folder
- How do I Use a For Loop with GridBagLayout
- Changed JSF-Implementation in Tomcat. From Mojarra to MyFaces. Managed-Beans does not work
- java.lang.UnsatisfiedLinkError: no swt-pi-gtk-2024 or swt-motif-2024 in java.library.path
- Mylyn refuses to work
- How to set 'File Search' as the default dialog when pressing CTRL + H in Eclipse or STS?
- Cause of this error: The type Test is not accessible due to restriction on required library?
- Eclipse - Open Resource - How to see only *.js files
- Weird output during JVM application execution in Eclipse - how to debug?
- Android app video recording when screen off
- Setting up EMF Compare on Eclipse and compiling
- How do I move to the newly created method generated by Eclipse's "Add unimplemented methods"-Quick Fix?
- When to choose "Generate an activator..." when creating a new Eclipse plugin project
- How is it possible to run the doc-command in a CounterClockwise-REPL in Eclipse?
- Application can't start android?
- java jar writes in two different character-encoding
- Sharing resources while simultaneously running multiple classes in Eclipse
- Runnable Jar Opening Error (Calculator Program)
- Invalid location of tag Caution (h2) in Eclipse
- How do I use native Android OS 4.1 Roboto font in Eclipse, API 16 (fontFamily)
- ClassNotFoundException: com.itextpdf.text.Element
- CVS Eclipse : A resource already exists on disk
- Cant copy xml file to another project