Importing ant build.xml in Eclipse

Suresh picture Suresh · Oct 7, 2010 · Viewed 98.9k times · Source

I have an android project that uses ant to build, is it possible to import this ant project in eclipse IDE?

update : There is an option to create project using ant build.xml in eclipse File->New->Project->Java->Java project from existing ant Buildfile. and if the build.xml file is selected it show error Specified buildfile does not contain a javac task

I guess javac is declared in this task

<taskdef name="setup"
classname="com.android.ant.SetupTask"
classpathref="android.antlibs"/>

Answer

mmdemirbas picture mmdemirbas · Dec 21, 2012

From this link:

  1. Open Eclipse, select File > New > Project
  2. Select "Java Project from Existing Ant Build File"
  3. Show your build file and write a project name