Eclipse常见问题及解决

一.The environment variable HOME is not set.

  1. 详细日志:
eclipse.buildId=4.5.2.M20160212-1500 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN Framework arguments: -product org.eclipse.epp.package.java.productCommand-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.productorg.eclipse.egit.ui 
Warning: The environment variable HOME is not set.
The following directory will be used to store the Git user global configuration and to define the default location to store repositories:'C:\Users\admin'. 
If this is not correct please set the HOME environment variable and restart Eclipse.
Otherwise Git for Windows and EGit might behave differently since they see different configuration options.
This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

2.日志分析:重点是The environment variable HOME is not set.这句话,也就是没有配置“HOME”这个环境变量。
3.解决办法:新建“HOME”环境变量,值为 “%USERPROFILE%”,即可解决。
4.备注:USERPROFILE是用来存放用户信息路径的变量名,可以在命令行下输入“set USERPROFILE”查看具体的路径。如果配置HOME变量后使用git提交代码时提示输入账户和邮箱,并在输入账户和邮箱名后提示拒绝访问的话,可以在USERPROFILE路径下新建一个名为“_netrc”的文件,里面的内容为
“machine github.com
login your-usernmae
password your-password”,然后继续使用git提交,按照提示输入账户和邮箱就不会再提示拒绝访问。

二.Multiple dex files define.

1.详细日志:

Conversion to Dalvik format failed:
Unable to execute dex: 
Multiple dex files define Lcom/baidu/location/Address$1;

2.日志分析:重点是Multiple dex files define这句话,意思是说定义了多个同样的文件,一般情况下是指libs文件夹中包含了两个相同jar的包。比如我的这个异常就是说libs文件夹下有两个关于百度定位的jar包,但大家遇到这种异常 大部分情况下都是有两个v4包。
3.解决办法:对于相同的jar包,随便删除一个即可。

三.如何导入Android工程到eclipse

File->import->android->Exiting Android Code Into WorkSpace->Browse选中需要导入的工程->finish.
1.这里写图片描述
2.这里写图片描述
3.这里写图片描述
4.这里写图片描述

四.overlaps the location of another project

1.场景:将一个工程直接复制到当前工作空间下,之后导入该工程时会失败,在details里会给出这个提示。
2.原因:当前工作空间下已存在同名的工程,所以不能重复导入。
3.解决:导入工程时不要直接将工程复制到当前工作空间下。可以先将工程复制到桌面上,然后在导入工程的时候勾选上“Copy project into workspace”,之后删除桌面上的工程即可。

五.eclipse control+alt+down不能使用

1.描述:eclipse中使用control+alt+down,整个屏幕倒置了。
2.原因:快捷键冲突。
3.解决:右键点击桌面空白处 –>图形选项–>快捷键 –>禁用 。
或者点击图形属性——>找到ctrl+alt+up 和ctrl+alt+down禁用掉就好了

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值