如何将gradle项目转换为android项目 [英] How do I convert a gradle project to android project
问题描述
您的Android项目在Eclipse ADT通常应该有2个文件
.project
<?xml version =1.0encoding =UTF-8?>
< projectDescription>
< name> Android-app< / name>
< comment>< / comment>
< projects>
< / projects>
< buildSpec>
< buildCommand>
< name> com.android.ide.eclipse.adt.ResourceManagerBuilder< / name>
< arguments>
< / arguments>
< / buildCommand>
< buildCommand>
< name> com.android.ide.eclipse.adt.PreCompilerBuilder< / name>
< arguments>
< / arguments>
< / buildCommand>
< buildCommand>
< name> org.eclipse.jdt.core.javabuilder< / name>
< arguments>
< / arguments>
< / buildCommand>
< buildCommand>
< name> com.android.ide.eclipse.adt.ApkBuilder< / name>
< arguments>
< / arguments>
< / buildCommand>
< / buildSpec>
< natures>
< nature> com.android.ide.eclipse.adt.AndroidNature< / nature>
< nature> org.eclipse.jdt.core.javanature< / nature>
< / natures>
< / projectDescription>
.classpath
<?xml version =1.0encoding =UTF-8?>
< classpath>
< classpathentry kind =srcpath =src/>
< classpathentry kind =srcpath =gen/>
< classpathentry kind =conpath =com.android.ide.eclipse.adt.ANDROID_FRAMEWORK/>
< classpathentry exports =truekind =conpath =com.android.ide.eclipse.adt.LIBRARIES/>
< classpathentry exported =truekind =conpath =com.android.ide.eclipse.adt.DEPENDENCIES/>
< classpathentry kind =outputpath =bin / classes/>
< / classpath>
一旦你更正了它们,你的项目就是Eclipse中的标准Android项目。
要从Eclipse中使用较新的构建系统,请尝试 Nodeclipse / Enide Gradle for Eclipse
(市场)
用于Eclipse的Gradle的一些屏幕截图:
I use Eclipse ADT and i have convert my android project to gradle project through configure -> convert to gradle project, actually i need to convert my gradle project to android project. How i can do that ?
Your Android project in Eclipse ADT usually should have 2 files
.project
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Android-app</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
.classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
Once you correct them, your project is back standard Android project in Eclipse.
To use newer build system from Eclipse try Nodeclipse/Enide Gradle for Eclipse (marketplace)
Some screenshots for Gradle for Eclipse:
这篇关于如何将gradle项目转换为android项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!