Rob
Rob

Reputation: 1152

Android Application, xml file errors :(

So I'm trying to follow this tutorial... to learn android, and I'm having a hard time because I feel like the tutorial was written with errors, and its hard to try and learn when you are teaching yourself errors..

Here is what the tutorial says:

Start by creating a new todolist_item.xml resource in the res/layout folder. It will specify how each of the to-do list items is displayed. For this example, your layout need only consist of the new TodoListItemView, set to fi ll the entire available area.

<?xml version=”1.0” encoding=”utf-8”?>
<com.paad.todolist.TodoListItemView
xmlns:android=”http://schemas.android.com/apk/res/android”
android:layout_width=”fill_parent”
android:layout_height=”fill_parent”
android:padding=”10dp”
android:scrollbars=”vertical”
android:textColor=”@color/notepad_text”
android:fadingEdge=”vertical”
/>

So i created a file in the res/layout folder, called todolist_item.xml and the file contains the following:

<?xml version=”1.0” encoding=”utf-8”?>
<com.paad.todolist.TodoListItemView
    xmlns:android=”http://schemas.android.com/apk/res/android”
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="10dp"
    android:scrollbars="vertical"
    android:textColor="@color/notepad_text"
    android:fadingEdge="vertical"
/>

and i get the following error:

"Multiple annotations found at this line: - error: Error parsing XML: XML declaration not well-formed - The value following "version" in the XML declaration must be a "

I am also getting this on another xml file... anyone able to see what i've done wrong?

Upvotes: 0

Views: 2657

Answers (2)

Rakesh Gondaliya
Rakesh Gondaliya

Reputation: 1050

This type of problem arises when u have put something in xml which is not required.U can solve it out by carefully writting XML file with proper structure.

EG.

android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" />

U can have layout..set its properties..within it u can add widgets ...add property..and then end layout....

Upvotes: -1

matt b
matt b

Reputation: 139921

You seem to have a funny character for your double-quotes in the <?xml version=”1.0” ... tag, as opposed to a straight " character.

What type of file encoding / keyboard layout do you use?

Upvotes: 3

Related Questions