2012-09-11 40 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