Skip to content

Setting up IntelliJ IDEA

Roger Hu edited this page Apr 21, 2020 · 22 revisions

Android Studio is a version of JetBrain's IntelliJ Community Edition specifically tailored for Android development. Installation instructions for Android Studio can be found here.

IntelliJ IDEA contains all the features found in Android Studio. Setup for Android development is, however, a bit more involved since it does not include the Android SDK by default.

Prerequisites

Configure IntelliJ IDEA

  • Open IntelliJ IDEA
  • Close all open project windows
  • The IntelliJ Welcome screen will be displayed
    • Add required SDKs
    • Click on Configure > Project Defaults > Project Structure
      • welcome screen
    • Select SDKs
    • Add Java Development Kit
      • Click + > JDK
        • Add JDK
      • Note: Press Cmd+Shift+. to show hidden files in the file chooser dialog.
      • Navigate to the JDK location. E.g., /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk on OSX.
      • Select the JDK folder
    • Add Android SDK
      • Click + > Android SDK
      • Note: Press Cmd+Shift+. to show hidden files in the file chooser dialog.
      • Navigate to the Android SDK location. E.g., for Homebrew installations, use /usr/local/Cellar/android-sdk/<sdk-tools-version>
      • Select the Android SDK version folder and accept the defaults presented
    • Click OK

Create an Android Project

  • On the welcome screen, click Create new project or select File > New Project from the menu bar.
  • Select Android from the Project Type List on the left
  • Select Gradle:Android Module from the options on the right
  • project type selection
  • On the project details screen, specify:
    • Application name
    • Package name
    • Minimum, Target, Compile SDKs
    • project details
  • Select Blank Activity from the template screen.
  • Accept or modify the subsequent defaults as necessary.
  • When the project is opened, Gradle attempts to pull in any dependencies. If there are errors:
    • In the error log, click on the recommended resolution.
    • missing repository

Finding these guides helpful?

We need help from the broader community to improve these guides, add new topics and keep the topics up-to-date. See our contribution guidelines here and our topic issues list for great ways to help out.

Check these same guides through our standalone viewer for a better browsing experience and an improved search. Follow us on twitter @codepath for access to more useful Android development resources.

Clone this wiki locally