Eclipse相关集锦

开场白,之前的个人博客写过很多细小的Eclipse的东西,这里将搬过来,作为整体一篇。

1.Eclipse提示失效

解决:window->Preferences->Java->Editor->Content Assist->Advanced 上面的选项卡Select the proposal kinds contained in the ‘default’ content assist list:中把 Other Java Proposals 选项打上勾就可以了。


2.Failed to load JavaHL Library

解决:Window — Preference —Team —SVN — SVN Interface 这里将JavaHL 改成SVNKit即可。


3.Failed to install on device timeout

解决:eclipse -window -Preferences – Android – DDMS – ADB connection time out(ms).把这个时间设置的长一些,默认是5秒,我改成20秒就ok了。


4.Eclipse自动生成Override

Source--Clean up会自动生成很多Override,下面就是cleanup的清理规则

Change non static accesses to static members using declaring type
Change indirect accesses to static members to direct accesses (accesses through subtypes)
Remove unused imports
Add missing ‘@Override’ annotations
Add missing ‘@Override’ annotations to implementations of interface methods
Add missing ‘@Deprecated’ annotations
Remove unnecessary casts
Remove unnecessary ‘$NON-NLS$’ tags


5.Java Override报错

解决:菜单栏选择Window--Preferences--Java--Compiler--Java Compliance 将级别设置为1。6即可。这样的更改会对所有的项目都其作用。


6.Workspace in use of cannot be created ,choose a different one Eclipse

在确定了只有一个Eclipse启动的情况下。

打开Eclipse目录,打开configuration.settings 这个目录,然后使用记事本打开org.eclipse.ui.ide.prefs,然后修改
RECENT_WORKSPACES=D:\androdiapps D:\java D:\java\intentTest成自己可用的路径就可以了,然后重启。


7.Unparsed aapt error(s)错误的处理方法

解决:文件名改成合法的限定字符,合法字符如下[a- z0-9_.]


8.Android requires compiler compliance level 5.0. Please fix project properties.错误

方法一. 项目 右键 ->android tools ->Fix Project

方法二. 如果不可以,检查Project -> Properties->Java Compiler

确认JDK compliance被设置为1.6,并且enable specific seetings.


9.Project is missing required source folder: ‘gen’

解决方法:
手动的创建这个文件夹,然后再刷新,这时就应该出现一个gen文件夹了,之后无论如何刷新和build都不会出问题了。

原文地址:https://www.cnblogs.com/jiangu66/p/3177795.html