Patrick
Patrick

Reputation: 19

Android .out.xml error?

Everytime I compile my android code, I get this error.

[2012-09-30 14:46:48 - My First App] activity_main.out.xml is out of sync. Please refresh.
[2012-09-30 14:47:08 - My First App] activity_main.out.xml is out of sync. Please refresh.
[2012-09-30 14:51:04 - My First App] Error in an XML file: aborting build.
[2012-09-30 14:51:18 - My First App] Error in an XML file: aborting build.
[2012-09-30 15:39:17 - My First App] Error in an XML file: aborting build.
[2012-09-30 21:21:33 - sup_cheesepuff] ------------------------------
[2012-09-30 21:21:33 - sup_cheesepuff] Android Launch!
[2012-09-30 21:21:33 - sup_cheesepuff] adb is running normally.
[2012-09-30 21:21:33 - sup_cheesepuff] Performing com.example.sup_cheesepuff.MainActivity activity launch
[2012-09-30 21:21:34 - sup_cheesepuff] Automatic Target Mode: launching new emulator with compatible AVD 'Froyo.'
[2012-09-30 21:21:34 - sup_cheesepuff] Launching a new emulator with Virtual Device 'Froyo.'
[2012-09-30 21:21:56 - Emulator] 2012-09-30 21:21:56.633 emulator-arm[7523:1107] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.
[2012-09-30 21:21:56 - sup_cheesepuff] New emulator found: emulator-5554
[2012-09-30 21:21:56 - sup_cheesepuff] Waiting for HOME ('android.process.acore') to be launched...
[2012-09-30 21:23:20 - sup_cheesepuff] HOME is up on device 'emulator-5554'
[2012-09-30 21:23:20 - sup_cheesepuff] Uploading sup_cheesepuff.apk onto device 'emulator-5554'
[2012-09-30 21:23:20 - sup_cheesepuff] Installing sup_cheesepuff.apk...
[2012-09-30 21:23:36 - sup_cheesepuff] Success!
[2012-09-30 21:23:36 - sup_cheesepuff] Starting activity com.example.sup_cheesepuff.MainActivity on device emulator-5554
[2012-09-30 21:23:41 - sup_cheesepuff] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.sup_cheesepuff/.MainActivity }
[2012-09-30 21:32:10 - sup_cheesepuff] Error in an XML file: aborting build.

I have looked at other threads with similar topics, but none help. Here is my XML source.

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <TextView
        android:id="@+id/textView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="@string/hello_world"
        tools:context=".MainActivity" />

    <TextView
        android:id="@+id/textView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="100dp"
        android:text="Hey boi!"
        android:textAppearance="?android:attr/textAppearanceLarge" />

</RelativeLayout>

I'm new to both Android and XML by the way.

Upvotes: 2

Views: 1015

Answers (2)

ajacian81
ajacian81

Reputation: 7569

This happens when you try to execute the app from Eclipse while you're editting an XML file. It tries to compile the XML file instead and fails miserably, producing the .out.xml file.

It's a simple fix, just delete the .out.xml file in question, and make sure you're editing a .java file when you go to compile (or you can set the target in Build Configurations).

Upvotes: 8

Kingfisher Phuoc
Kingfisher Phuoc

Reputation: 8190

This problem occurs when you try to compile your project from XML file! You could compile from your java file or you could compile from any where by: removing all instances of org.eclipse.wst.xsl.* from the folder "\Eclipse\plugins" and after restart the Eclipse, all will work as expected. Try it!

Upvotes: 2

Related Questions