IntelliJ IDEA Export to Eclipse Android工程不能正常被Eclipse识别的解决方法
2013-04-26 21:28
591 查看
最近迷上了IntelliJ IDEA,就Android开发而言,确实要比Eclipse好用,尤其是对于Layout的布局,非常方便,但是公司大部分同事使用的还是Eclipse,这就存在一个问题——我创建的工程,怎么能让其他同事导入并开发。虽然IDEA提供了“Export to Eclipse”,但是在实际过程中还是存在问题的——Eclipse在import时,不能将这个Android工程正确识别,总是作为Java工程导入,经过反复试验,终于找到了问题——“.project”这个文件在搞鬼,具体解决方法如下:
上面是使用IDEA创建的Android module在执行Export to Eclipse后的.project文件中的全部内容。这些内容是Eclipse工程的最基本的内容,要想让Eclipse能将其正确识别为Android工程,要进行如下修改
其中第7行至第18行,以及第25行,都是要自己添加的内容,添加完毕以后保存,再次将工程导入到Eclipse,这下就能正确识别为Android工程了。如果导入后出现了error,不要慌,可以使用Android Tools->Fix Project Properties来解决错误。
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>IDEATest</name> <comment/> <projects/> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments/> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
上面是使用IDEA创建的Android module在执行Export to Eclipse后的.project文件中的全部内容。这些内容是Eclipse工程的最基本的内容,要想让Eclipse能将其正确识别为Android工程,要进行如下修改
<?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>IDEATest</name> <comment/> <projects/> <buildSpec> <buildCommand> <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name> <arguments/> </buildCommand> <buildCommand> <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name> <arguments/> </buildCommand> <buildCommand> <name>com.android.ide.eclipse.adt.ApkBuilder</name> <arguments/> </buildCommand> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments/> </buildCommand> </buildSpec> <natures> <nature>com.android.ide.eclipse.adt.AndroidNature</nature> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription>
其中第7行至第18行,以及第25行,都是要自己添加的内容,添加完毕以后保存,再次将工程导入到Eclipse,这下就能正确识别为Android工程了。如果导入后出现了error,不要慌,可以使用Android Tools->Fix Project Properties来解决错误。
相关文章推荐
- IntelliJ IDEA Export to Eclipse Android工程不能正常被Eclipse识别的解决方法
- Eclipse导入Android工程出现Project has no default.properties file! Edit the project properties to set one.的解决方法
- Eclipse无法正常创建android工程解决方法!
- Eclipse无法正常创建android工程解决方法!
- eclipse不能自动编译工程的解决方法
- linux,eclipse不能识别android手机解决办法~
- eclipse中tomcat正常启动但不能访问tomcat管理页面的解决方法
- Android中导入工程出现Project has no default.properties file! Edit the project properties to set one.的解决方法
- [置顶] Android无法启动AVD解决方法出现"The connection to adb is down...You must restart adb and Eclipse."
- Ubuntu上Eclipse不识别Android手机的解决方法
- Android开发中使用Eclipse创建工程后提示The project cannot be built until build path errors are resolved问题的解决方法
- Android安卓ECLIPSE导致工程到AndroidStudio里 报错 Failed to open zip file 解决办法
- Eclipse web工程导入到myeclipse中Tomcat不能直接部署之解决方法
- Eclipse不能自动编译工程的解决方法
- Ultra-Pull-To-Refresh动态添加View不能正常显示BUG解决方法
- eclipse中导入android工程时因源工程java编译环境不同导致编译错误的解决方法
- eclipse中tomcat正常启动但不能访问tomcat管理页面的解决方法
- eclipse导入maven工程,右键没有build path和工程不能自动编译解决方法
- eclipse不能自动编译工程的解决方法
- android工程eclipse的alt+/提示键在编写xml文件时没有提示解决方法