java 错误“S”无效?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32543884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 20:21:46  来源:igfitidea点击:

Error 'S' is not a valid?

javaandroid

提问by mlkalr3b

i'm trying to Create splash screen on Android Studio and i have this Little problem with the code

我正在尝试在 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>

(Error:Error: 'S' is not a valid file-based resource name character: File-based resource names must contain only lowercase a-z, 0-9, or underscore).

(错误:错误:'S' 不是有效的基于文件的资源名称字符:基于文件的资源名称必须仅包含小写字母 az、0-9 或下划线)。

All the s is lowercase
I do not know what is the problem .

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

images to the problem

问题的图片

enter image description here

在此处输入图片说明

http://i.imgur.com/IDfT7T6.png

http://i.imgur.com/IDfT7T6.png

回答by jpw

Try changing the filename Splash.xmlto all lowercase: splash.xml. I have a vague memory that it might matter.

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