2012-09-11 41 views
0

日食不能識別我的佈局文件夾,我的佈局不能被日食不能識別我的佈局文件夾

R.layout.activity_qr01 

引用和錯誤說:我的佈局不能得到解決或無法在現場

activity_qr01的代碼是:

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

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_centerHorizontal="true" 
    android:layout_centerVertical="true" 
    android:text="@string/hello_world" 
    tools:context=".QR01" /> 
    </RelativeLayout> 

+0

請上傳'activity_qr01.xml'文件的代碼。 – Lucifer

+0

我發佈了代碼activity_qr01 – LetsamrIt

+0

我可以發佈我的問題的答案或不允許 – LetsamrIt

回答

2

你的XML文件是res/menu文件夾,它應該在res/layout文件夾中。

+0

我的佈局文件夾是在res文件夾內 – LetsamrIt

+0

D:\ workspaceQR \ QR01 \ res \ menu \ activity_qr01.xml 不,它不是。 – razielsarafan

+0

我發現在menue文件夾內的同一個xml文件activity_qr01,現在我刪除它,我只有在res文件夾內的activity_qr01和問題仍然存在和CONSOL不顯示任何錯誤,但activity_qr01仍然無法識別 – LetsamrIt

0

最後缺少</RelativeLayout>

此外,您的文件被稱爲activity_qr01.xml,所以你必須引用它作爲R.layout.activity_qr01

+0

我引用R.layout.activity_qr01,我發佈的只是一個例子 – LetsamrIt

+0

您是否嘗試清理您的項目? – razielsarafan

+0

是的,我嘗試了很多次,我也重新啓動了工作區 – LetsamrIt