导入下载的android项目,很多红叉,报缺少api,下面的链接里讨论到。
http://stackoverflow.com/questions/3311474/problem-importing-android-project-archives-into-eclipse
这个帖子也提到同样的问题
第二个帖子,对这个问题现象英文描述详细贴切。
Hey,
i was just trying to build the project, but something in eclipse seems
to be screwed. at first i thought my eclipse 3.5 might be too old, so
i updated to 3.6, but the error is the same. i imported SuperCollider-
Android into my workspace, but it opens up with all the android API
missing, and when i go to properties -> android, i get an error
"The currently displayed page contains invalid values".
i can select "Builders" and then "Android" again, and i get the radio
buttons for the API level, but eclipse won't remember what i do here,
even if i hit apply or ok.
probably easiest is to create the .project anew? how difficult would
it be to add an ant build.xml script so it could be build from the
command-line?
best, -sciss-
解决总结:
1、Delete Eclipse specific files and folders (eg. “.settings”, “.project” “.metadata” etc.) from your Android project folder.
2、Did you go to "File > Import existing project"? The best way is actually to go "File > New > Project > Android project" and then in the new-project-wizard choose "from existing source".
3、待项目放到其他随意路径,不要放到workspace下,否则报
Invalid project description
------>detail: ->>> xxxx(project path) overlaps the location of another project: 'xxxx'
why?i don't know now.
如果项目还是想建在workspace下,在workspace下新建一个android项目,把下载项目的相关源文件考过去,it works!