Project

General

Profile

Support #680

Android Development Environment on Arch

Added by Daniel Curtis about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Development Environment
Target version:
Start date:
10/18/2015
Due date:
% Done:

100%

Estimated time:
3.00 h
Spent time:

Description

This is a guide on how I set up my development environment for developing Android applications on Arch Linux.

Prepare the Environment

  • Edit the pacman config file:
    vi /etc/pacman.conf
    
    • And uncomment the multilib definition:
      [multilib]
      Include = /etc/pacman.d/mirrorlist
      
  • Make sure the system is up to date:
    pacman -Syu
    
  • Install a few dependencies:
    pacman -S gcc git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool perl-switch zip unzip libxslt python2-virtualenv bc wget gcc-multilib lib32-zlib lib32-ncurses lib32-readline
    
  • Install libtinfo:
    yaourt libtinfo
    
  • Import the ncurses5-compat-libs pgp key:
    gpg --keyserver pgp.mit.edu --recv-keys 702353E0F7E48EDB
    

Install Android SDK

  • Install the Android SDK from the AUR:
    yaourt -S android-sdk
    
  • Install the Android SDK Platform Tools from the AUR:
    yaourt -S android-sdk-platform-tools
    
  • Install the Android SDK Build Tools from the AUR:
    yaourt -S android-sdk-build-tools
    
  • Create an android sdk users group:
    groupadd sdkusers
    
  • Add the user bob into the sdkusers group:
    gpasswd -a bob sdkusers
    
  • Change folder's group ownership
    chown -R :sdkusers /opt/android-sdk/
    

    4
  • Change permissions of the folder so the user in the sdkuser group will be able to write in the sdk folder:
    chmod -R g+w /opt/android-sdk/
    
  • Log out and log back in for the new group to take effect.

Install Android SDK Platform API

  • Next install the latest Android SDK Platform API:
    yaourt -S android-platform
    

Install Android Tools

  • Install android-tools:
    pacman -S android-tools
    
  • Enable USB Debugging on the phone or device:
    1. Jelly Bean (4.2) and newer: Go to Settings > About Phone tap Build Number until a popup appears that you have become a developer (about 10 times). Then go to Settings -> Developer --> USB debugging and enable it.
    2. Older versions: This is usually done from Settings -> Applications -> Development -> USB debugging. Reboot the phone after checking this option to make sure USB debugging is enabled.
  • Install android-udev:
    pacman -S android-udev
    
  • Add yourself to the adbusers group:
    gpasswd -a bob adbusers
    

Install Android Studio IDE

  • Install Android Studio from the AUR:
    yaourt -S android-studio
    
    • (Optional) Install the android-support package:
      yaourt -S android-support
      

Resources

Also available in: Atom PDF