In this NEWB guide we walk you through getting ready for Android development on your Mac, you dirty yuppie hipster! Getting ready for Android development on your mac is pretty straightforward. Just download a bunch of shit and boom, you're on your way to making the next Tinder.
Download Android Studio and Java Virtual Machine(JVM) for Mac
The first thing you need to download is Android Studio and install it like any other Mac app. After you've got Android Studio downloaded just run the installer and drag Android Studio to your Applications folder.
Android Studio will prompt you to download Java for OSX if you don't have it. After you install the JVM Android Studio will open up into a setup wizard.
Open Android Studio and Begin Your Journey to Greatness
After installing Java, Android Studio opens up and you're prompted to step through a few wizards.
If you're just starting Android development your best bet is to leave all the settings as the defaults. So just follow the mother fucking wizard! Android Studio needs to download a bunch of stuff for you, like SDKs, device images, APIs and more.
We recommend sticking with the Standard setup if you're just starting out
Welcome to Android Studio!
And FINALLY, we're ready to actually make something happen! To get going, just click on "Start a new Android Studio Project" and you'll be taken through a few screens to start a new project. We cover this in the CodeBabes Android Course Intro.
Typical Android Studio Problems
Now after you get Android Studio open there are a few errors that people typically encounter. One that will be immediately obvious is if the virtual phone doesn't render correctly in the Design view. This is demoralizing, a kick in the straight in the balls. You just spent at least 30 minutes getting all this stuff set up, probably did about 50 google searches trying to find shit and here is one more problem just to test your resolve. To be an Android developer you have to WANT IT!
Rendering Problems, or Phone is missing
If there's a rendering issue, or the phone isn't loading you should change the AppTheme in the design view. Newer versions of Android Studio also resolve this bug.
Android Studio is looking for the wrong SDK, or the SDK is not installed
The second issues is the Java JDK on your computer is not compatible with the Android SDK version you're using, or the JDK doesn't even exist. Usually OSX comes with JDK 6 though. However, if you're targeting a recent release of Android you'll need to compile with JDK 7, so go download it here!
Changing the Java Development Kit (JDK) Version
To change the JDK version your Android Studio project is referencing, go to File > Project Structure and you'll see the following screen where we need to update the JDK from 6 to 7.
Find the new JDK
To find JDK 7 click the little box to the right of the JDK location field. The JDK installer sticks the JDK 7 in /System/Library/JavaVirtualMachines. All you need to do is open the JDK 7 directory, select 'home', then press OK and you're ready for some hot compiling action!!
Select the 'Home' directory
Once you're done with that you should be ready to actually start building some apps. May the force be with you, seriously, don't give up. Android development is HARD, but the it'll be worth it, we promise!