Eclipse学习和错误总结

Eclipse版本:adt-bundle-windows-x86-20140321

Eclipse学习

1.修改项目名称

右击项目名称-->refactor-->rename

2.再次引入已存在的android工程

File-->Import-->Android:Existing Android Code Into Workspace-->点击Next-->点击Browser,选择androird工程的路径

如果导入已存在的android工程步骤如下:

3.Parser exception forE:\AndroidWorkspace\MixView\AndroidManifest.xml: 文件提前结束。

1.将工程拷贝到之前建立的工作空间文件夹下;

2.import-->Android/Existing Android Code Into Workspace-->next-->选择工作空间文件夹下的工程文件-->勾选Copy projects into workspace-->finish;

3.之后会发现eclipse中刚导入的工程名前有一个红色的叹号,且该工程的Android Manifest.xml处有一个红叉;Console中报如下信息:

[2013-05-02 17:01:28 - MixView] Project has no target set. Edit the project properties to set one.
[2013-05-02 17:01:28 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception forE:\AndroidWorkspace\MixView\AndroidManifest.xml: 文件提前结束。
[2013-05-02 17:01:28 - MixView] Project has no target set. Edit the project properties to set one.
[2013-05-02 17:01:29 - MixView] Parser exception for /MixView/AndroidManifest.xml: 文件提前结束。

且Android Manifest.xml文件为空。src下的java文件也为空,layout下的xml文件也为空。

a.解决办法:出现以上问题的原因是因为导入之前先将工程文件拷贝到了工作空间文件夹下,如果在其他文件夹下直接导入的话不会出现以上问题。

b.解决办法:删掉Android工程中的.project

4.Eclipse导入Android工程报错 Invalid project description

学习网址:http://blog.csdn.net/diyangxia/article/details/9303577

 

 

错误总结

1.项目中,出现红色感叹号

Steps to reproduce:

- Create a workspace in Eclipse, ensuring that Project->Build Automatically is selected as an option.

- Import the attached projects.

- Observe, off the bat, that the following error will occur for the AndroidApp project in your Problems view: "The container 'Library Projects' references non existing library '[workspace path]/AndroidLibrary/bin/androidlibrary.jar'"

- Refresh the AndroidApp project.  Observe that the problem goes away.- Select Project -> Clean..., Choose "Clean all projects", and hit OK.

- Observe the same error as above.

- Refresh the AndroidApp project.

- Observe that the Console view shows the following message: "[date - AndroidLibrary] R.java was modified manually! Reverting to generated version'".  Observe that the previous error also goes away.

- Go to Project -> Build Automatically to de-select automatic builds.- Go through the Project -> Clean... workflow above, also ensuring in this case that "Start a build immediately" is selected, as well as "Build the entire workspace"..

- Observe the following error for the AndroidApp project in the Problems view: "The project cannot be built until build path errors are resolved".

- Refresh the AndroidApp project.- Select Project -> Build Project.- Observe that the error goes away

.- Go through the Project -> Clean... workflow above.

- Observe that the previous error returns.

You basically can't clean your workspace in these scenarios, without going through additional steps to ensure that each dependent project is built separately from the library project.  It's cumbersome at best, and blocking if you can't figure out why it's happening.

2.Unable to resolve target 'Google Inc.:Google APIs:6

对比eclipse中正常项目中的project.properties,修改的地方为:

target=?  为正常项目中的值

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值