Java 错误';S';这是无效的吗?

Java 错误';S';这是无效的吗?,java,android,Java,Android,我正试图在Android Studio上创建闪屏,但代码有点小问题 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_weight="match_parent" android:layout_width="fill_parent" an

我正试图在Android Studio上创建闪屏,但代码有点小问题

    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools" android:layout_weight="match_parent"

    android:layout_width="fill_parent"
    android:layout_height="wrap_content" android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    android:paddingBottom="@dimen/activity_vertical_margin" tools:context="splash">

    <TextView android:text="splash screen" android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:textsize="45dp"
        android:layout_aligmParentBottom="true"
        android:id="@+id/text"
        android:layout_alignParentTop="true"
        android:layout_centerHorizontal="true" />


    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/imageView"
        android:layout_centerVertical="true"
        android:layout_centerHorizontal="true"
        android:src="@drawable/preview"/>

</RelativeLayout>

(错误:错误:“S”不是有效的基于文件的资源名称字符:基于文件的资源名称只能包含小写的a-z、0-9或下划线)

所有的s都是小写的
我不知道是什么问题

解决问题的方法


尝试将文件名
Splash.xml
更改为所有小写:
Splash.xml
。我的记忆模糊,这可能很重要。

尝试将文件名
Splash.xml
更改为所有小写:
Splash.xml
。我的记忆模糊,这可能很重要。

试着用
s
代替所有
s
逐个查找字符试着用
s
代替所有
s
逐个查找字符谢谢你的工作,但我还有一个问题。错误:(1)字符串类型不允许(在'layout_weight'处,值为'match_parent')。@mlkalr3b是的,我现在搜索了一点,发现了一个重复的问题,解决了同样的问题。好的,你能帮我解决这个错误吗:(1)字符串类型不允许(在'layou weight'处,值为'match_parent')。@mlkalr3b我对安卓不太熟悉(我自己只是一个初学者),但我认为
layout\u-weight
属性根本不适用于RelativeLayout。也许你也需要使用不同的布局。
layout\u-weight
是一个浮点值,用于指定
LinearLayout
中的相对权重。谢谢你的工作,但我遇到了另一个问题。错误:(1)不允许使用字符串类型(在'layout_weight'处,值为'match_parent')。@mlkalr3b是的,我现在搜索了一下,发现了一个重复的问题,解决了同样的问题。好的,你能帮我解决这个错误吗:(1)不允许使用字符串类型(在'layou weight'处,值为'match_parent')。@mlkalr3b我对安卓不太熟悉(我自己只是一个初学者),但我看不到相对布局的
layout\u-weight
属性。也许你也需要使用不同的布局。
layout\u-weight
是一个浮点值,用于在
线性布局中指定相对权重