A project in Android Studio contains one or more modules that keep your code organized into discrete units of functionality. This page shows how to start a new project or import an existing project.
For more information about the Android project structure and module types, read Projects Overview. For more information on adding a module for a new device to an existing project, read Add a Module for a New Device.
Start a new project
Android Studio makes it easy to create Android apps for various form factors, such as phone, tablet, TV, Wear, and Google Glass. The New Project wizard lets you choose the form factors for your app and populates the project structure with everything you need to get started. Use the following steps to create a new project.
Step 1: Start and configure the project
If you didn't have a project opened, Android Studio shows the Welcome screen. To create a new project, click Start a New Android Studio project.
If you had a project opened, Android Studio shows the development environment. To create a new project, click File > New > New Project.
The next window lets you configure the name of your app, the package name, and the location of your project.
Enter the values for your project then click Next.
Step 2: Select form factors and API level
The next window lets you select the form factors supported by your app, such as phone, tablet, TV, Wear, and Google Glass. The selected form factors become the app modules within the project. For each form factor, you can also select the API Level for that app. To get more information, click Help me choose.
The Android Platform Distribution window shows the distribution of mobile devices running each version of Android, as shown in figure 2. Click on an API level to see a list of features introduced in the corresponding version of Android. This helps you choose the minimum API Level that has all the features that your apps needs, so you can reach as many devices as possible. Then click OK.
Then, on the Target Android Devices window, once you've selected your form factors and API versions, click Next.
Step 3: Add an activity
The next screen lets you select an activity type to add to your app, as shown in figure 4. This screen displays a different set of activities for each of the form factors you selected earlier.
Choose an activity type then click Next.
Note: If you choose "Add No Activity," click Finish to create the project.
Step 4: Configure your activity
The next screen lets you configure the activity to add to your app, as shown in figure 5.
Enter the activity name, the layout name, and the activity title. Then click Finish.
Step 5: Develop your app
Android Studio creates the default structure for your project and opens the development environment. If your app supports more than one form factor, Android Studio creates a module folder with complete source files for each of them as shown in figure 6.
Now you are ready to develop your app. For more information, see the following links:
Import an existing project
To import an existing project into Android Studio, proceed as follows:
- Click File > New > Import Project.
- In the Select Eclipse or Gradle Project to Import window that appears, navigate to the root directory of the project you want to import.
- Click OK.
Android Studio then opens the project in a new IDE window.
If you are importing a project from version control, use the File > New > Project from Version Control menu. For more information about importing projects from version control, read IntelliJ’s VCS-Specific Procedures.
If you are importing an existing Eclipse ADT project into Android Studio, how you add the project depends on its structure. To read more about importing projects from Eclipse, see Migrate to Android Studio from Eclipse.