Android Eclipse中未检测到布局的XML文件

Android Eclipse中未检测到布局的XML文件,android,xml,eclipse,deprecated,Android,Xml,Eclipse,Deprecated,我不确定我做错了什么,但这个问题让我头疼。在下面的代码中,R.layout.row和R.id.value都显示为错误,并在Eclipse上显示红线。它确实说,SimpleCorsorAdapter已被弃用,但使用@SuppressWarnings(“弃用”),它应该可以工作,对吗 @SuppressWarnings("deprecation") @Override protected void onPostExecute(Void result) { //

我不确定我做错了什么,但这个问题让我头疼。在下面的代码中,R.layout.rowR.id.value都显示为错误,并在Eclipse上显示红线。它确实说,SimpleCorsorAdapter已被弃用,但使用@SuppressWarnings(“弃用”),它应该可以工作,对吗

@SuppressWarnings("deprecation")
    @Override
    protected void onPostExecute(Void result)
    {
        // TODO Auto-generated method stub
        super.onPostExecute(result);
        SimpleCursorAdapter adapter;
        if(Build.VERSION.SDK_INT>= Build.VERSION_CODES.HONEYCOMB)
        {
            adapter=new SimpleCursorAdapter(getActivity(), R.layout.row, constantCursor, new String[] { DatabaseHelper.TITLE, DatabaseHelper.VALUE }, new int[] { R.id.title, R.id.value }); 

        }
        else
        {
            adapter=new SimpleCursorAdapter(getActivity(), R.layout.row, constantCursor, new String[] { DatabaseHelper.TITLE ,DatabaseHelper.VALUE }, new int [] { R.id.title, R.id.value }); 
        }

        setListAdapter(adapter); 
    }
res/layout目录下的row.xml具有以下内容:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

<TextView 
    android:id="@+id/title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentLeft="true"
    android:textSize="20sp"
    android:textStyle="bold"
    />

<TextView 
    android:id="@+id/value"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentRight="true"
    android:textSize="20sp"
    android:textStyle="bold"
    />

</RelativeLayout>


您是否已将右R导入到您的类中?也许是安卓。R,你有进口。@JaredLuo:该死!!我怎么会忽视这一点。。。非常感谢:)