How to configure IntelliJ for Android

April 15, 2018

My Java toolchain doesn’t change that often; typically just to upgrade to newer versions, or add a plugin that I find interesting. In this post, I’ll demonstrate a step-by-step walkthrough to install IntelliJ, which I use for larger projects. This configuration should also work well for CS 349 assignments!

Once completed, these steps should enable you to build and run Java and Android apps on your machine.

1. Install Homebrew & Java

Homebrew is a comprehensive package manager that you can use to install and update almost any software package on a Mac. I use it to maintain most of my build tools. You can install it from here. Once it’s installed, we can use it to install some basics.

$ brew install git
$ brew install java

2. Install IntelliJ

Grab the latest version of [IntelliJ Community from the JetBrains site]( The Commuity Edition supports standard Java and Android applications, and is fine for most purposes.

JetBrains also offers a free license for most of their development tools for students and faculty, which support additional languages like Python and Javascript.

Install using whatever method is appropriate for your platform.

3. Configure Java

You need to set some options in IntelliJ so that it uses the correct version of Java (i.e. it may default to an older system version instead of the shiny new version you installed earlier, and we need to fix that).

  1. Launch IntelliJ.
  2. From the “Open Project” dialog, click on the Configure button, then “Project Defaults”, “Project Structure”.

4. Install Plugins

Out-of-the-box, InstallJ will build desktop apps, but we need to add Android support.

  1. Launch IntelliJ.
  2. From the “Open Project” dialog, click on the IntelliJ Menu, and choose “Preferences”. Navigate to plugins, and you should see a list something like this (it will vary by platform/version).

Make sure to check at least the following plugins, and click OK.

That’s it! There’s other options to setup, but they’re project specific. Generally, IntelliJ should work find now if you use the New-Project wizard, and set the appropriate options when you setup your project.