SDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferences

SDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferences

现象描述

              Android新后报错location of the android sdk has not been setup in the preferences。所有建立好的模拟设备都不能用了,eclipse里的SDK Manager也打不开,出现下图状况

SDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferencesSDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferences

原因:

   出现这种情况,主要是由于我更新了SDK Tools,导致android更新后ADT的版本过低造成的,但是有的人又因为跟新ADT失败导致,也有部分人是ADT版本低导致。下面就是博主造成这种情况的操作

》》》1.更新了的操作

SDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferences

》》》2.然后当你下一次打开环境的时候,会发现

SDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferences

》》》3.如果点击Check for Updates会出现第3-1的情况,如果选择关闭,则会出现3-2的情况

===================情况3-1

SDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferencesSDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferences

====================情况3-2

SDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferences

》》》4.接着会出现

SDK更新后,重新打开Eclipse时提示错误Location of the Android SDK has not been setup in the preferences

》》》5.最后,会发现这个环境就彻底的废了。(*好尴尬呀*)

解决方案

    一种方法,当你不小心手误(手贱*_*)更新了SDK后,遇到了如上的问题,可以换个工作空间就好了,虽然之前的一些设置还得重新弄,但还好这个环境还是用的。对于有强迫症的人来说,并不想更换工作空间(即使换了工作空间,还是想用以前的额工作空间的名称,【恋旧情节-_-】),可以把原来工作空间里面的.metadata文件夹删除掉,然后在运行eclipse。
   切记,当你安装上面的方法修改好的环境,千万不要在手误(手贱*_*)在把sdk tools更新了,如果是第二次遇到上述的问题,一般是没救了,只能重新安装ADT Bundle环境了(如果你足够幸运的话,可能还可以救活,反正博主第二次没救活)。