Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

"Data at the root level is invalid. Line 1, position 1"

$
0
0

This error appears when trying to view the Main.axml in Visual Studio. It's a new, untouched project.

My XML is valid, as far as I can tell, and I have not changed it in any way. There are no strange characters to be found when inspecting the file.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >
<Button
    android:id="@+id/MyButton"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/Hello"
    />
</LinearLayout>

I am able to compile this default app to android, but I am more interested in actually editing it. How do I fix it?

Thanks.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>