Wilson Mar bio photo

Wilson Mar

Hello!

Calendar YouTube Github

LinkedIn

Install Android Studio and other steps to Android Things

US (English)   Norsk (Norwegian)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   Napali   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

Here is a tutorial on how to develop an Android apk file on a Mac.

  1. Install XCode (via the App Store)
  2. XCode command line tools, for a prompt for a dialog:

    
    xcode-select --install 
    
  3. Homebrew
  4. brew doctor
  5. Use Homebrew to install Java:

    
    brew install --cask caskroom/versions/java8
    
  6. Use Homebrew to install tools used for Android dev :

    
    brew install ant
    brew install maven
    brew install gradle
    
  7. To avoid “.android/repositories.cfg could not be loaded” error, create a blank file:

    
    touch ~/.android/repositories.cfg
    

    The equivalent of this for Powershell on Windows 10:

    New-Item C:\Users$username.android\repositories.cfg -type file

  8. Use Homebrew to install the Android Software Development Kit (sdk):

    
    brew install --cask android-sdk
    

    This takes several minutes. Just wait while “Installing Cask android-sdk”.

  9. Use Homebrew to install the Android Native Development Kit (ndk):

    
    brew install --cask android-ndk
    
  10. Install all the Android SDK components:

    NOTE: The android update sdk --no-ui command is deprecated.

  11. Install HAXM for blazing fast emulators. Check out the “Configuring VM Acceleration on Mac” section at:

    http://developer.android.com/tools/devices/emulator.html

  12. Edit your ~/.bash_profile to update environment variables:

    export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"      
    export ANT_HOME=/usr/local/opt/ant
    export MAVEN_HOME=/usr/local/opt/maven
    export GRADLE_HOME=/usr/local/opt/gradle
    export ANDROID_HOME=/usr/local/opt/android-sdk
    export ANDROID_NDK_HOME=/usr/local/opt/android-ndk
    
  13. Update your paths (bonus points to a better solution to the hardcoded build tools version):

    export PATH=$ANT_HOME/bin:$PATH
    export PATH=$MAVEN_HOME/bin:$PATH
    export PATH=$GRADLE_HOME/bin:$PATH
    export PATH=$ANDROID_HOME/tools:$PATH
    export PATH=$ANDROID_HOME/platform-tools:$PATH
    export PATH=$ANDROID_HOME/build-tools/19.1.0:$PATH
    
  14. Periodically run these commands again to ensure you’re staying up to date:

    
    brew update
    android update sdk --no-ui
    

    There might be an issue with brew update and the android-sdk formula.

    Android Studio

    Alternately, you can install and use Eclipse, IntelliJ, or your other favorite IDE.

    Alternately, download the dmg from https://developer.android.com/studio/install.html

    But the easiest way is:

  15. Install Android Studio:

    
    brew install --cask android-studio
    

    Alternately, see http://macappstore.org/android-studio/ for manual download. https://classroom.udacity.com/courses/ud808/lessons/4216368924/concepts/43072785890923# is a video mini-course done April 2015 about that approach.

    • https://github.com/caskroom/homebrew-cask/blob/master/Casks/android-studio.rb
  16. Pinch 4 fingers together over the touchpad and type “An” to select “Android Studio”.

  17. Select “Do not import settings.”
  18. Custom.
  19. Choose the Default or darker Dracular theme (which uses less battery, I’m told).
  20. Check “Android Virtual Device”, then Next for /Users/wilsonmar/Library/Android/sdk
  21. 2 GiB on a 16 GiB machine.
  22. Finish. It takes several minutes for Downloading and install.
  23. Provide password to HAXM installation changes.
  24. When “Silent install Pass!” appears, press Finish.
  25. See

    Training

  26. Get training

    https://www.udacity.com/course/developing-android-apps–ud853 free video course with https://discussions.udacity.com at Android level “Lollipop”.

    • https://github.com/udacity/ud851-Sunshine
    • https://github.com/udacity/ud851-Exercises

    https://developer.android.com/training/basics/firstapp/index.html text-only instructions

More on IoT

This is one of a series on IoT:

  1. IoT Acronymns and Abbreviations on Quizlet

  2. IoT Home Assistant system

  3. IoT Apprentice school curriculum
  4. IoT use cases
  5. IoT reminders prevent dead mobile battery
  6. IoT barn feeder

  7. IoT text to speech synthesis
  8. IoT AWS button
  9. Intel IoT
  10. IoT Raspberry hardware
  11. IoT Raspberry installation

  12. IoT Clouds
  13. Samsung IoT Cloud

NOTE: Pages about GE’s Predix have been removed.