• 使用Eclipse的常见问题整理


    我在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:#JavaForAndriodRealappcompat_v7inappcompat_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:SLappcompat_v7 esvalues-v21 hemes_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'	':
    e.doit=false;
    fProposalShell.setFocus();
    returnfalse;

    修改为

    case'	':
        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

  • 相关阅读:
    poj 2676 Suduku (dfs)
    poj 1562 Oil Deposits (dfs)
    poj 2907 Collecting Beepers (dfs)
    poj 1655 Balancing Act (树形dfs)
    poj 3411 Paid Roads (dfs)
    hdu 2896 病毒侵袭 (AC)
    hdu 3065 病毒侵袭持续中 (AC)
    poj 2251 Dungeon Master (bfs)
    java中debug使用
    Swing入门级小项目总结
  • 原文地址:https://www.cnblogs.com/rysinal/p/5834490.html
Copyright © 2020-2023  润新知