1

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

    <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).

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

images to the problem

enter image description here

https://i.stack.imgur.com/qYv2f.png

jpw
  • 44,361
  • 6
  • 66
  • 86
mlkalr3b
  • 41
  • 1
  • 1
  • 3

1 Answers1

22

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

jpw
  • 44,361
  • 6
  • 66
  • 86
  • 1
    Thank you that work but i got Another problem . Error:(1) String types not allowed (at 'layout_weight' with value 'match_parent'). – mlkalr3b Sep 12 '15 at 22:02
  • @mlkalr3b Yeah, I searched a bit now and just found a duplicate question addressing the very same issue. – jpw Sep 12 '15 at 22:03
  • Alright can you help me with this Error:(1) String types not allowed (at 'layout_weight' with value 'match_parent'). – mlkalr3b Sep 12 '15 at 22:07
  • @mlkalr3b I'm not that familiar with Android (only a beginner myself), but I don't see the `layout_weight` attribute as available for RelativeLayout at all. Maybe you need to use a different layout too. – jpw Sep 12 '15 at 22:11
  • @mlkalr3b I would create a new question for that problem so that some more experienced Android devs can see it. – jpw Sep 12 '15 at 22:22
  • 1
    `layout_weight` is a float value specifying relative weight in a `LinearLayout` – Kane O'Riley Sep 12 '15 at 23:05
  • Thanks! It worked. – Arjun Kalidas Aug 11 '17 at 06:56