2015-09-12 84 views
1

我試圖創建在Android Studio的啓動畫面和我的代碼錯誤'S'不是一個有效的?

<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」是不是一個有效的基於文件的資源名稱的字符:文件 - 基於資源的資源名稱只能包含小寫的az,0-9或下劃線)。

所有的小寫字母
我不知道是什麼問題。

圖像的問題

enter image description here

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

+1

嘗試用手工輸入's'代替所有's'看字符 –

回答

20

嘗試更改文件名Splash.xml爲全部小寫:splash.xml。我有一個模糊的記憶,它可能很重要。

+1

謝謝你的工作,但我得到了另一個問題。 錯誤:(1)字符串類型不允許(在'layout_weight'值'match_parent')。 – mlkalr3b

+0

@ mlkalr3b是的,我現在搜索了一下,剛剛發現一個重複的問題,解決了同樣的問題。 – jpw

+0

好吧你能幫我這個 錯誤:(1)字符串類型不允許(在'layout_weight'值'match_parent')。 – mlkalr3b

相關問題