Error:Unable to resolve target 'android-2'

后端 未结 4 1337
执笔经年
执笔经年 2020-12-05 12:13

[2011-02-10 00:14:34 - newproject] Unable to resolve target \'android-2\'


and the newproject java and xml files does\'t have an any error but the project is in

4条回答
  •  庸人自扰
    2020-12-05 12:35

    I've just had this problem. The fix is simple - restart Eclipse. The reason is a bit more complicated:

    1. I had a fresh install of Eclipse and android SDK v.17 (4.2.2)
    2. I downloaded and imported source code (ActionBarSherlock) which had target=android-14 in it's project.properties file.
    3. Eclipse figured out that I use android-17 and updated project.properties to target=android-17, BUT, eclipse still had target=android-14 cached somewhere in its workspace's .metadata folder and was using the cahced version during the build

    Restarting eclipse solved it.

提交回复
热议问题