使用Eclipse的常见问题整理

来源:互联网 发布:河南省统计局数据直报 编辑:程序博客网 时间:2024/05/16 04:37

我在Eclipse里新建一个android工程的时候附带着产生了一个名字为appcompat_v7的工程,这个工程是干什么用的啊?为何我新建的工程都出错了,错误信息提示为:

error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.;The container 'Android Dependencies' references non existing library 'E:#\JavaForAndriodReal\appcompat_v7\bin\appcompat_v7.jar';

解决办法:右击library project,选择Build Path->Configure Build Path->Order and Export->Select All将所有包都选上就OK 啦


解决启动Eclipse后提示’Running android lint’错误的问题

打开项目的AndroidManifest.xml文件,android:targetSdkVersion=”21”改为“20”或以下的值。由于Android L为预览版本,版本号还是使用“20”的原因导致了此问题。修改完后,再Project
-> Context Menu -> Android Tools -> Fix Project Properties操作一次,再清空全部项目并自动编译,这样问题就解决了。


求解决一个关于Eclipse建立至少支持低于Android4.0时Android项目报错问题

http://bbs.csdn.net/topics/390930750

E:\SL\appcompat_v7\res\values-v21\themes_base.xml:191:
说明,要求你的 sdk 为 android5.0的 sdk,因此,你需要把 Property 中 Android 的对应版本改成5.0才行,而你的是4.2,低了


eclipse 自动联想设置

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


关于Eclipse自动补全

这里比较全面http://www.cnblogs.com/decarl/archive/2012/05/15/2502084.html

设置 xml 文件的代码提示功能

打开 Eclipse 依次选择 Window > Preferences > Xml > Editor > Content Assist > Auto activation > Prompt when these characters are inserted ,设置框中默认是 <=: ,(

现在将它改为:

<=:.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(,

Java自动提示

Eclipse -> Window -> Perferences -> Java -> Editor -> Content Assist

Auto activation triggers for Java:

.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

修改Eclipse 声明变量时对变量名的自动补全
要新建一个String类型的变量value,则当输入到value的时候,eclipse会在候选列表中列出valueString,如果此时再输入空格的话,就会选中候选列表中的valueString,则新建的变量将会变成valueString
首先,打开Eclipse,打开window->show view,选择Plug-ins,再找到org.eclipse.jface.text,右键单击,选择import as-> Source Project,导入完成后,在你的workspace就可以看到这个project了。
然后,在导入工程下的“org.eclipse.jface.text.contentassist.CompletionProposalPopup#verifyKey()”函数中有一段代码: (CTRL+F搜索)

if(contains(triggers, key)){...}

将这段代码改为

if(key!=0x20&& key!='='&& key!=';'&& contains(triggers, key)){    ...}

还有把这段代码之上的代码

case'\t':e.doit=false;fProposalShell.setFocus();returnfalse;

修改为

case'\t':    e.doit=false;    insertSelectedProposalWithMask(e.stateMask);    break;

经过上述操作,这个辅助输入插件已经排除了空格与“=”的选中功能,增加了TAB键的选中功能。最后就是导出修改后的插件,右键点击你的workspace里的工程,选择Export->Deployable plugins and fragments,点击Next,选择Destination选项卡,选择Directory,选择一个要保存插件的目录,然后Finish。然后就会在你所选的目录下产生一个新的plugins目录,里面有一个jar文件,用它替换掉eclipse/plugins里面的org.eclipse.jface.text

0 0