Project

General

Profile

Support #680

Updated by Daniel Curtis almost 8 years ago

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

 h2. Prepare the Environment 

 * Edit the pacman config file: 
 <pre> 
 vi /etc/pacman.conf 
 </pre> 
 #* And uncomment the multilib definition: 
 <pre> 
 [multilib] 
 Include = /etc/pacman.d/mirrorlist 
 </pre> 

 * Make sure the system is up to date: 
 <pre> 
 pacman -Syu 
 </pre> 

 * Install a few dependencies: 
 <pre> 
 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 
 </pre> 

 * Install "yaourt":https://project.altservice.com/issues/509 

 * Install libtinfo: 
 <pre> 
 yaourt libtinfo 
 </pre> 

 * Import the ncurses5-compat-libs pgp key: 
 <pre> 
 gpg --keyserver pgp.mit.edu --recv-keys 702353E0F7E48EDB 
 </pre> 

 h2. Install Android SDK 

 * Install the Android SDK from the AUR: 
 <pre> 
 yaourt -S android-sdk 
 </pre> 

 * Install the Android SDK Platform Tools from the AUR: 
 <pre> 
 yaourt -S android-sdk-platform-tools 
 </pre> 

 * Install the Android SDK Build Tools from the AUR: 
 <pre> 
 yaourt -S android-sdk-build-tools 
 </pre> 

 * Create an android sdk users group: 
 <pre> 
 groupadd sdkusers 
 </pre> 

 * Add the your user bob into the sdkusers this group: 
 <pre> 
 gpasswd -a bob sdkusers 
 </pre> 

 * Change folder's group ownership 
 <pre> 
 chown -R :sdkusers /opt/android-sdk/ 
 </pre> 

 * Change permissions of the folder so the user in the sdkuser group will be able to write in the sdk folder: 
 <pre> 
 chmod -R g+w /opt/android-sdk/ 
 </pre> 

 * Log out and log back in for the new group to take effect. 

 h3. Install Android SDK Platform API 

 * Next install the latest Android SDK Platform API: 
 <pre> 
 yaourt -S android-platform 
 </pre> 

 h3. Install Android Tools 

 * Install android-tools: 
 <pre> 
 pacman -S android-tools 
 </pre> 

 * Enable USB Debugging on the phone or device: 
 *# *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. 
 *# *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: 
 <pre> 
 pacman -S android-udev 
 </pre> 

 * Add yourself to the adbusers group: 
 <pre> 
 gpasswd -a bob adbusers 
 </pre> 

 h2. Install Android Studio IDE 

 * Install Android Studio from the AUR: 
 <pre> 
 yaourt -S android-studio 
 </pre> 

 h2. Resources 

 * https://wiki.archlinux.org/index.php/Android 
 * http://developer.android.com/training/basics/firstapp/index.html 
 * http://developer.android.com/training/index.html 
 * http://developer.android.com/training/basics/firstapp/creating-project.html

Back