SDK issue to convert SDK to SDK file

I am developing an Android application and I have a problem with the layout resource, crashing.

I am new (ish) for Java, Android and Eclipse. Each time I save XML, Eclipse simply outputs the following:

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

I checked that there are no .out files. I checked the XML and it seems to be valid. The file name is numberSelectorDialog.xml. I checked that the path is not close to the Win32 limit.

The my Layout xml resource looks like this:

<?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?

Thank,

Philip

+3
source share
1 answer

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

The file name should be completely lowercase, and not camel like mine.

Philip

+5

Source: https://habr.com/ru/post/1728687/


All Articles