The XML in your post is ok. I just pasted it into an XML editor and it
validates OK.

However, this is what i've seen in Eclipse as well when editing XML
files for my android projects, especially XML files for layout in
Eclipse's layout-editor plugin for Android.

Sometimes an error is reported when there is none. And most of the
time i could get rid of the error by removing whitespace and re-adding
it; e.g. by deleting a new-line and replacing it by a space. It has me
puzzled... i suspect there is something going on with the white-space
handling of the layout-plugin that handles XML files. Maybe Cr+Lf
versus just Lf, i don't know....


On Mar 4, 1:27 am, idev <ideveloper...@gmail.com> wrote:
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>     android:orientation="vertical"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     android:background="@drawable/bkg"
>     >
>     <TextView
>     android:layout_width="fill_parent"
>     android:layout_height="200px"
>     android:text="@string/hello" >
>     </TextView>
>     <LinearLayout
>     android:orientation="horizontal"
>     android:layout_width="fill_parent"
>     android:layout_height="55px"
>     android:gravity="center">
>     <Button android:id="@+id/installRing"
>             android:layout_width="wrap_content"
>             android:layout_height="52px"
>             android:background="@drawable/installBtn">
>         </Button>
>     </LinearLayout>
>
> </LinearLayout>
>
> I cannot understand what is wrong with this layout. I keep getting
> this error in the xml saying Element type "Button" must be either
> followed by attributes or > or />
> I don't understand why the editor can't recognize android:id as an
> attribute! I tried writing the whole XML again but keep getting this
> error!
>
> Thanks for any help.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to