I've created several Android applications with the ADT in Eclipse, but I'm now unable to edit res/layout/main.xml in new or old Android projects. When I type in the main.xml tab, my keystrokes have no effect. Similarly, I am unable to make changes in the Graphical Layout tab. I can drag a widget onto the screen, but it does not remain when I let go of the mouse button. I have checked that main.xml is not write-protected, both through Eclipse and the file system. I am able to create another file in that directory, through either Eclipse or the file system, which shows that the directory is not write-protected. I have no problem editing or adding files under the "src" directory.
I am running Eclipse Classic 3.6.1 with version 10.0.1.v201103111512-110841 of the Android Development Tools on Windows 7. FWIW, I recently installed plugins for some other Google tools (GWT and GAE), although I did not use them for any of the Android projects (obviously).
Update: When I edit the xml in a different editor and then refresh it in Eclipse, I get the error "Error parsing XML: unbound prefix". My file is correct, but I discovered that the standard URL "http://schemas.android.com/apk/res/android" is unreachable. Specifically, the server is down. I don't know if this is related to my original problem.
Update2: Here is foo.xml, which I created outside of Eclipse but is showing the error Error parsing XML: unbound prefix on the second line:
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:text="TextView"
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
The site schemas.android.com is still down.
I tried running my program to get the compiler errors, but it build correctly, and the error went away from the .xml file. Go figure.
That still leaves the original problem of not being able to edit any .xml file within Eclipse. When I tried to edit the above xml file, I got this error in a popup:
No grammar constraints (DTD or XML schema) detected for the document.
My guess is that this is due to schemas.android.com being down.
Update 3 (in response to slund's comment):
Cleaning and rebuilding did not change anything. I could build, but I still got the "No grammar constraints" error when I tried editing either .xml file.
The directory of the xml files is C:\Users\Ellen\workspace\SqliteDemo\res\layout, just as it should be. It contains no other files. The Problem view showed no warnings or problems for this project (although there were some for other projects of mine).
Update 4
I also cannot edit the (default) AndroidManifest.xml from within Eclipse.