Reputation: 1449
Here's a screenshot pertaining to the error I'm encountering
How can I fix this ?
I'd really appreciate some help
This is the XML code :
<?xmlversion="1.0" encoding="utf-8"?>
<LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="This is my first Android Application!" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="And this is a clickable button!" />
</LinearLayout>
Upvotes: 0
Views: 1028
Reputation: 172
I believe there is no string named "hello" in Strings.xml
(in res->values).
Please check, probably this should solve your problem.
Upvotes: 3
Reputation: 12745
LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"
Needs to be
LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
Without that space, the first XML tag is invalid.
Full XML would be:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" />
<TextView android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="This is my first Android Application!" />
<Button android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="And this is a clickable button!" />
</LinearLayout>
Upvotes: 3