This post will walk you through configuring your machine for Android development.
Install
- Android Studio – IDE for building Android apps. I install most things from the SDK manager just ’cause.
- Java – Needed for writing and running Java/Android applications.
- If you open Android Studio without downloading it, it will ask you to install.
- When you create your first Android Studio project using API 23, it will give you a message: “Error:(3, 22) compileSdkVersion android-23 requires compiling with JDK 7.” Use the link given to download JDK 7).
- git – Type a git command (e.g. git clone repoUrl) in the Terminal and it will prompt you to install Xcode command line tools. Click install from the pop up. After installed you should be able to use git from the command line.
- Genymotion – Fast emulator. Requires VirtualBox to power it. You’ll also need to sign up for an account (free for personal use). Once configured, download a virtual device and start it up.
Configuration
Configure your ANDROID_PATH for your shell so that you can use the Android tools from the command line. I like to change the default shell to zsh. Checkout my .zshrc (config file) for an example of how to set your path.
Configure github so that you can commit to your repositories. You could forgo the terminal completely by using their desktop client, but I suggest you go the terminal route and configure SSH.
I create an icon for Terminal (when it’s open you can drag somewhere on the bar to create), remove the requirement to press fn before function keys (e.g. F1, F2, F3), and make the dock stop bouncing incessantly.
Other Software
- SourceTree – Git branch management, Configure it with your Github credentials. I like to install the command line tools so I can type “stree” to open the application quickly.
- MacDown – Markdown editor. Great for READMEs and other documentation. I like to document my process and all the errors I work through with Internet research when I’m stuck (example for configuring Robolectric and Android studio).
- Slack + Screenhero – Collaboration tools. Screenhero is great because you can take over each other’s screens when pair programming.
- OmniGraffle – Great for app design, wireframes, and mockups as well as collaborating with PMs and designers. I also use it to create documentation and diagrams for my code.
- FocusTimer or other Pomodoro Timer.
What’s indispensable in your development? Let me know if I missed something!
If you’d like more detailed instructions, you can find them in my book, Android Theory Book. If you want help getting started with Android development, Android Activity Book is your best bet.
Awesome setup article! One minor point, Genymotion is no longer necessary now that Android Studio will auto-configure your initial emulator to use HAXM after you install it.
My hatred for the Emulator goes deep, so I stick with Genymotion. 🙂
Genymotion is still faster to start up and and the keyboard support is better 🙂
Not to say that the emulator doesn’t work more times than it actually does 🙂
I use the Android Studio plug ADB-Idea (https://github.com/pbreault/adb-idea) and “Android Tool for Mac” (https://github.com/mortenjust/androidtool-mac). The latter is a time-saver – even for the non-Android-dev’s on the team (eg managers, and QA). Spares me the interruptions for screenshots and load-a-build requests.
I am skipping Genymotion more and more now that Vysor (https://chrome.google.com/webstore/detail/vysor-beta/gidgenkbbabolejbgbpnhbimgjbffefm) is available.
Also, if you are working on a project that uses web services you really need to run a proxy else you will be break-pointing all over the place. I haven’t found better than http://www.charlesproxy.com/