First of all, forgive me if I posted this question incorrectly. I used stackoverflow for many problems, but this is the first time that I could no longer find the answer to my problem. So, if I have something wrong, let me know and I will post / edit the question.
Now to the point. I just started development with the Android SDK recently and I am following the basic tutorial from http://developer.android.com/resources/tutorials/hello-world.html#avd I got the xml editing part and when I do all the changes in xml files main.xml and strings.xml, this error occurs. In addition, when I compile the project, the compilation process creates a main.out.xml file that is empty. I do not know what it is or its purpose.
Mistake:
[2011-12-30 16:10:02 - Hello Razor] res \ layout \ main.xml: 0: error: the resource master record is already defined. [2011-12-30 16:10:02 - Hello Razor] res \ layout \ main.out.xml: 0: Originally defined here. [2011-12-30 16:10:02 - Hello Razor] C: \ Users \ Dux69 \ workspace \ Hello Razor \ res \ layout \ main.out.xml: 1: error: XML parsing error: element not found [ 2011-12-30 16:10:13 - Hello Razor] Error in the XML file: aborting build.
My project is configured for the platform: Android 2.3.3 API level: 10
I donβt know if it matters or not, but I use my Android Incredible to run / debug the application, not the Android Virtual Device. If you need more information, let me know and I will send it as soon as possible.
Here are three code files that I use:
main.xml
<?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/textview" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" android:text="@string/hello_O" />
strings.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="hello_O">Baba in the house, Razor Activity!</string> <string name="app_name">Hello Razor App</string> </resources>
razorActivity.java
package hello.Razor; import android.R; import android.app.Activity; import android.os.Bundle; public class razorActivity extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
DuxClarus
source share