最近使用 Help --> Check for Updates 升级了Eclipse部分插件,之后新建4.3的工程,res/layout 下的xml布局文件无法预览了,
一预览总是报这个错:
This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in
上网查了一下,需要更新Eclipse插件:
Help --> Install New Softwares...,在Work with 中输入如下链接:
https://dl-ssl.google.com/android/eclipse/
Eclipse会弹出提示有更新,但是有没有发现非常慢?
打开 C:\Windows\System32\drivers\etc\hosts ,新增如下内容:
203.208.48.134 dl-ssl.google.com
升级adt插件后,eclipse突然出现Unable to build: the file dx.jar was not loaded from the SDK folder 错误
Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
升级adt插件后,eclipse突然出现上面错误,无法运行android项目。
网上搜索了很多方法试过了都不行,clean,换workspace目录,把tools下的dx.jar拷贝到对应platform下面也不行,重启eclipse,更新sdk都不行。
最终在stackoverflow上搜索到一个方法试了以后才可以
platform-tools\lib folder was missing after upgrade (my eclipse was open). close eclipse, using sdk manager uninstall and install "Android SDK platform-tools".
即先关闭eclipse,打开sdk安装目录下的SDK Manager.exe 顶部Tools 下面的两个勾选上以后点击下面的 Install packages 按钮更新,更新完成后启动eclipse就可以了
还可能出现
eclipse xml文件中按没有提示
在xml文件上右击-->open with ,看一下xml文件的默认打开方式。我遇到的是在Layout下的xml文件里没有提示信息。查看了一下xml的默认打开方式不是Android Layout Editor,这时需要修改xml文件的默认打开方式:
设置默认打开方式为XML Editor。
菜单:Window -> Preferences -> General -> Editors -> File Associations
File types: *.xml
Associated editors:XML Editor*** -> Default
在Associated editors选择框里点击“XML Editor*** ”,点击“Default”按钮。
你将看到“XML Editor*** ”排在最上面,其变为“XML Editor(Default)*** ”。