After a long time not using Eclipse, I recently started it again to experiment further with Android development. 3 things came up, which I would like to share with you and what the fix is.
After creating a test Android project, the following error showed up:
ERROR: Unable to open class file <path>\gen\com\example\test\R.java: No such file or directory.
It seems that the java compiler cannot create this R.java. In order to fix this, do the following:
- Open Eclipse
- Open Window/Preferences
- Expand JAVA option
- Select Build Path
- Check the option "Project" and uncheck "folder" options
- Click on OK
- Restart eclipse IDE
These steps fixed my problems regarding this issue.
When trying to run the application, the following error came up:
An internal error occurred during: "Launching test".com/android/ddmlib/ShellCommandUnresponsiveException
The fix for this was to update the Android DDMS by going to Help -> Software Updates select the Android DDMS and press Update button.
I had updated the Android Development tools, but had forgotten to update the Android DDMS.
Unable to view manifest files from within Eclipse, when you open the main.xml
When you try to open an application's manifest file from within Eclipse, you might get an error such as this one:
An error has occurred. See error log for more details.
org.eclipse.wst.sse.ui.StructuredTextEditor.isBlockSelectionModeEnabled()Z
Try reverting to the 3.0 version of the Eclipse XML Editors and Tools. If this does not work, remove the 3.1 version of the tool. To do this in Eclipse 3.4:
- Select Help > Software Updates...
- Select the Installed Software tab.
- Select Eclipse XML Editors and Tools.
- Click Uninstall.
- Click Finish.
- When you restart Eclipse, you should be able to view the manifest files.
In my case, I just uninstalled them and it magically worked
Hope these were useful for you if you encounter the same issue.