Skip to content

Preparing Android environment

Amr Aboelela edited this page May 19, 2017 · 26 revisions

Parent page: Prepare and install

  • In .bash_profile in Mac OS, or .bashrc in Ubuntu add a line like this:

      export ANDROID_PATH=~/Android
      export ANDROID_NDK_DIR=$ANDROID_PATH/Sdk/ndk-bundle
      export PATH=$ANDROID_NDK_DIR:$ANDROID_PATH/Sdk/tools:$ANDROID_PATH/Sdk/tools/bin:$ANDROID_PATH/Sdk/platform-tools:$PATH
    
  • Then (in Mac OS):

      $ source .bash_profile
    
  • Or (in Ubuntu):

      $ source .bashrc
    
  • Install needed packages (in Ubuntu):

      $ sudo apt-get install openjdk-8-jre-headless libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
    
  • Install Android Studio

  • Install ant:

    • Install brew package management from: http://brew.sh

    • Run the following:

      $ brew update

      $ brew install ant

##Emulator

  • Create emulator with name avd1:

      $ android create avd -n avd1 -t <targetID>
    
  • Run the emulator named avd1:

      $ emulator -avd avd1 &
      $ disown
    

    disown is used so you can close the terminal without terminating the emulator

  • For more details check: How do I launch the Android emulator from the command line?

  • You can also run the script:

      myos/android/frameworks/resources $ ./emulator.sh
    

##Standalone setup

##Child pages

##See also

##External links

Clone this wiki locally