- Navigate to http://developer.android.com/sdk/index.html#ExistingIDE
- "Download the SDK Tools for Mac"
- Copy the
android-sdk-macosxdirectory to your Home directory. - Navigate to
android-sdk-macosx/toolsand executeandroid - You may need to allow Gatekeeper to install from anywhere
- Settings --> Security & Privacy --> "Allow applications downloaded from: Anywhere"
- When opening
android, if you do not have a Java Runtime, OS X will download it for you (you'll have to relaunchandroidonce the runtime is installed) - Check off the following packages:
- Android SDK Platform-tools (Rev. 16)
- Android 4.2 --> SDK Platform
- Android 4.2 --> ARM EABI v7a System Image
- Android 4.1 --> SDK Platform
- Extras --> Android Support Library
- Extras --> Intel x86 Emulator Accelerator (HAXM)
- Click "Install 6 packages..."
- Click the "Accept All" radio button and click "Install"
- Install HAXM
- Navigate to
android-sdk-macosx/extras/intel/Hardware_Accelerated_Execution_Managerand executeIntelHAXM.dmg - It will unpack. Double-click the
.dpkgand follow the instructions, using the defaults.
- Navigate to
- Launch Terminal
nano ~/.bash_profile
- -Edit
~/.bash_profileto add these at the end:
export ANDROID_HOME=~/android-sdk-macosx
export PATH=$PATH:~/android-sdk-macosx/platform-tools
export PATH=$PATH:~/android-sdk-macosx/tools
- Close nano
source ~/.bash_profile
sudo nano /etc/launchd.conf
- -Edit
launchd.confto add these at the end:
setenv M2_HOME /usr/share/maven
setenv ANDROID_HOME /Users/YOURUSERNAMEHERE/android-sdk-macosx
setenv JAVA_HOME /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/
- You should now be able to run
adbfrom the command line. Try runningadb devicesThe console should outputList of devices attachedwith identifiers for any Android devices or emulators you have running (probably none at the moment).
- http://www.jetbrains.com/idea/download/
- Click "Download Now" for the Community Edition (FREE) on the right side
- Open the
.dmgfile - Drag the thing to the thing. (technical definition)
- You can now open IntelliJ from the Applications folder.
- Open IntelliJ
- View --> Open Module Settings (or F4)
- Select "SDKs" under "Platform Settings"
- Click the plus sign and select "Java SDK"
- Finder should show "Home". Select "Choose" and it should bring in Java 1.6
- Click the plus sign and select "Android SDK"
- Navigate and select the
android-sdk-macosxfolder and select "Choose" - If you have installed multiple Android SDK versions, you can choose one here. Since we only installed 4.2, go ahead and click "OK".
- Note that it is a bit tedious to do this for all Android SDK versions =\
- Navigate to a dev/ directory
- Follow the instructions here: http://willowtreeapps.github.com/OAK/quick-start.html
- Maven will check out a number of projects and prompt for some setup parameters:
- groupId:
com.demo.android - artifactId:
demo-android - version:
[USE DEFAULT] - package:
[USE DEFAULT] - Y:
[USE DEFAULT]
- groupId:
- Output will be
BUILD SUCCESSand you should now have ademo-androidfolder in this directory.
- Open IntelliJ
- File --> Open... -->
pom.xml(from the created project)
- Right-click the main module (the demo-android "folder") and select "Open Module Settings" (or F4)
- Select "Modules" under "Project Settings" (if not already selected)
- Choose an Android SDK under the Module SDK dropdown (for example
Android 4.2 Platform) - Do the same for the
~apklib-com.actionbarsherlock_actionbarsherlock_4.2.0module
- Open IntelliJ
- Tools --> Android --> AVD Manager
- Select the "Device Definitions" tab, select "Galaxy Nexus", and select "Create AVD..."
- Check off "Use Host GPU" and otherwise use the defaults. Select "OK".
- Highlight the created AVD and select "Start..."
- Select the dropdown next to the Play button and select "Edit Configurations..."
- Click the Plus icon at the top and select "Android Application"
- Name your module if you like
- Select the module (there should be only one, it'll be named demo-android)
- Select the "Show chooser dialog" radio button (this will prompt you to install it on an emulator or attached device)
- Click OK
- Click Play.
- A dialog should pop up allowing you to choose a plugged-in device or launch an emulator.
- Launch the emulator, and wait for it to load and browse your app in all its glory.
- Congratulate yourself on having a ListView without having touched a single line of code.
- Open Terminal and navigate to the project directory
- Execute
mvn clean installto compile - Exeucte
mvn android:deployto deploy the app to a device or emulator
- Use the Dark Theme
- IntelliJ IDEA --> Preferences... --> Appearance --> Theme: Darcular
- (Restart)
- Enable zoom with Cmd + Mouse Wheel
- IntelliJ IDEA --> Preferences... --> Editor --> Check "Change font size (Zoom) with Command+Mouse Wheel"
- Disable caret after end of line
- IntelliJ IDEA --> Preferences... --> Editor --> Uncheck "Allow placement of caret after end of line"
- Show line numbers
- IntelliJ IDEA --> Preferences... --> Editor --> Appearance --> Check "Show line numbers"
- If coming from Eclipse, use Eclipse keybindings
- IntelliJ IDEA --> Preferences... --> Keymap --> Keymaps: Eclipse
- Install JSON Formatter Plugin
- IntelliJ IDEA --> Preferences... --> Plugins
- Browse repositories, find JSON Formatter, install, restart
- Install ALL Sdks and such
- android update sdk --no-ui --obsolete --force
- Let it chug along.
- Use the WTA code style