R.java出错

导入一个Android SDK里的练习程序,有一个错误解决不掉。

The type R is already defined.

无奈啊,搞不定。

R.java代码如下
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*

  • This class was automatically generated by the
  • aapt tool from the resource data it found. It
  • should not be modified by hand. */

package com.android.demo.notepad1;

public final class R {
public static final class attr {
}
public static final class drawable {
public static final int icon=0x7f020000;
}
public static final class layout {
public static final int notepad_list=0x7f030000;
}
public static final class string {
public static final int app_name=0x7f040000;
public static final int no_notes=0x7f040001;
}
}

碰到过这种情况
有可能你的src里有个R.java,在gen下还有一个
删掉一个就可以了
我一般保留gen下的那个

The type R is already defined. \

那应该就是你在别的地方也有一个R类嘛