我正在开发一个Android应用,但布局资源出现问题,失败了.
我是Java,Android和Eclipse的新手.每次保存XML时,Eclipse都会简单地输出以下内容:
…“无效的文件名:必须仅包含[a-z0-9_.].”
我已经检查了没有.out文件.我已经检查过XML,它似乎是有效的.文件名是numberSelectorDialog.xml.我检查了路径是否接近Win32限制.
我的布局资源xml如下所示:
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">
android:layout_width="wrap_content" android:layout_height="wrap_content">
android:layout_width="50px" android:layout_height="50px">
android:layout_height="50px" android:layout_width="50px">
android:layout_height="50px" android:layout_width="50px">
android:layout_width="wrap_content" android:layout_height="wrap_content">
android:layout_width="50px" android:id="@+id/Button04">
android:layout_width="50px" android:id="@+id/Button05">
android:layout_width="50px" android:id="@+id/Button06">
android:layout_width="wrap_content" android:layout_height="wrap_content">
android:layout_width="50px" android:id="@+id/Button07">
android:layout_width="50px" android:id="@+id/Button08">
android:layout_width="50px" android:id="@+id/Button09">
还有其他建议吗?
谢谢,
菲利浦
解决方法:
我发现了问题…秘密在错误消息中;-)
文件名必须完全小写,不能像我一样驼峰化.
菲利浦
标签:android,resources
来源: https://codeday.me/bug/20191024/1919219.html