views:

260

answers:

1

Hi,

I'm developing an Android app, and I am having an issue with a layout resource, failing.

I'm new(ish) to Java, Android and Eclipse. Everytime I save the XML, Eclipse simply outputs the following:

... "Invalid file name: must contain only [a-z0-9_.]"

I've checked there are not .out files kicking around. I've checked over the XML and it seems to be valid. The filename is numberSelectorDialog.xml. I've checked the path isn't close to the Win32 limit.

My Layout resource xml looks like so:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
    android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:padding="12px" 
    android:layout_width="175px" android:layout_gravity="center_vertical|center_horizontal|center"
    android:focusable="true" android:focusableInTouchMode="true"
    android:gravity="center_vertical|center_horizontal|center">
    <LinearLayout android:id="@+id/LinearLayout02"
        android:layout_width="wrap_content" android:layout_height="wrap_content">
        <Button android:id="@+id/Button01" android:text="1"
            android:layout_width="50px" android:layout_height="50px"></Button>
        <Button android:id="@+id/Button02" android:text="2"
            android:layout_height="50px" android:layout_width="50px"></Button>
        <Button android:id="@+id/Button03" android:text="3"
            android:layout_height="50px" android:layout_width="50px"></Button>
    </LinearLayout>
    <LinearLayout android:id="@+id/LinearLayout03"
        android:layout_width="wrap_content" android:layout_height="wrap_content">
        <Button android:text="4" android:layout_height="50px"
            android:layout_width="50px" android:id="@+id/Button04"></Button>
        <Button android:text="5" android:layout_height="50px"
            android:layout_width="50px" android:id="@+id/Button05"></Button>
        <Button android:text="6" android:layout_height="50px"
            android:layout_width="50px" android:id="@+id/Button06"></Button>
    </LinearLayout>
    <LinearLayout android:id="@+id/LinearLayout04"
        android:layout_width="wrap_content" android:layout_height="wrap_content">
        <Button android:text="7" android:layout_height="50px"
            android:layout_width="50px" android:id="@+id/Button07"></Button>
        <Button android:text="8" android:layout_height="50px"
            android:layout_width="50px" android:id="@+id/Button08"></Button>
        <Button android:text="9" android:layout_height="50px"
            android:layout_width="50px" android:id="@+id/Button09"></Button>
    </LinearLayout>
<Button android:layout_height="wrap_content" android:text="Clear" android:layout_width="fill_parent" android:id="@+id/ButtonClear"></Button>
</LinearLayout>

Any other suggestions?

Thanks,

Philip

+3  A: 

Hi,

I found the problem...the secret was in the error message ;-)

The filename had to be entirely lowercase not camel cased as I had it.

Philip

Philip