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=? 为正常项目中的值