IntelliJ IDEA 2017.2 Help

Importing an Existing Android Project

With IntelliJ IDEA you can not only create an Android project from scratch, but also import an existing project developed using other tools. The default scenario is to import an existing Android-Gradle project. However, you can also import a Maven, Eclipse or Flash Builder project, or even build a new project from a bunch of source files.

As a rule, when you import a project, your source files remain in their original location - IntelliJ IDEA simply creates a superstructure that allows treating your sources, libraries and other assets as an IntelliJ IDEA project. IntelliJ IDEA automatically generates the .idea directory that contains a set of configuration files (.xml), and a project file (.iml) for each of the project modules (for more details, see About Projects and About modules).

  1. Select File | New | Project from Existing Sources from the main menu.
  2. In the dialog that opens, browse to the project (or a directory containing source files) that you want to import:
  3. On the second step, select whether you want to build a project from scratch using the files under the specified directory, or whether you want IntelliJ IDEA to build a project according to the selected model and proceed in a more automated way. In our case IntelliJ IDEA is aware that this Android project uses the Gradle build system, recognizes the build.gradle file and suggests importing from Gradle.
  4. On the third step, you can modify Gradle settings and click Finish.
    The newly created IntelliJ IDEA project built from the external Gradle model will open.
Last modified: 30 August 2017

See Also