I've spent a day on trying to put all the pieces together, been in hundreds of sites and tutorials, but they all skip trivial steps.
So here's the full guide:
- Download and install Java JDK (Choose the Java platform)
- Download and install Android SDK (Installer is recommended)
- After android SD finishes installing, open SDK Manager under Android SDK Tools (sometimes needs to be opened under admin's privileges)
- Choose everything and mark Accept All and install.
- Download and install IntelliJ IDEA (The community edition is free)
- Wait for all downloads and installations and stuff to finish.
New Project:
- Run IntelliJ
- Create a new project (there's a tutorial here)
- Enter the name, choose Android type.
- There's a step missing in the tutorial, when you are asked to choose the JDK (before choosing the SDK) you need to choose the Java JDK you've installed earlier. Should be under
C:\Program Files\Java\jdk{version}
- Choose a New platform ( if there's not one selected ) , the SDK platform is the android platform at
C:\Program Files\Android\android-sdk-windows
.
- Choose the android version.
- Now you can write your program.
Compiling:
- Near the Run button you need to select the drop-down-list, choose Edit Configurations
- In the Prefer Android Virtual device select the ... button
- Click on create, give it a name, press OK.
- Double click the new device to choose it.
- Press OK.
- You're ready to run the program.