Eclipse将SVN项目导入为Android项目

时间:2014-04-07 12:12:05

标签: android eclipse

我在Eclipse中使用SVN插件从我们的存储库中获取代码。显然有些文件没有正确检查,Eclipse项目现在看起来像一个简单的项目。

我知道所有源文件都存在,但现在可以将其作为Android项目运行。有没有办法将我的项目“正确”转换为Android项目?

1 个答案:

答案 0 :(得分:0)

编辑.project文件:

<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
    <name><PROJECT NAME></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>

编辑/创建project.properties文件

target=android-<API LEVEL>

现在,Ecplise应该将您的项目重新标识为Android项目。

相关问题