Developing Android APP With Emacs

Table of Contents

1 Install android SDK and NDK

  • Download Android SDK and NDK
    http://developer.android.com/sdk/index.html
  • Run android update sdk to start up GUI
  • Select and install the package from available packages
  • Export path to sdk tools
    export PATH=${PATH}:/home/yannik/work/android_sdk_ndk/android-sdk-linux/tools
  • Create a avd virtual device
    android creat avd -n AVD -t 1 -b armeabi
    -n: virtual device name
    -t: target ID, can get with android list targets

2 Config Emacs

(require 'android-mode)
(custom-set-variables
 '(android-mode-avd "AVD")
 '(android-mode-sdk-dir "/opt/android-sdk/"))

3 Start developing android APP

  • Start emulator
    M-x android-start-emulator
  • Create a project
    M-x android-create-project
    1. input project path: /home/yannik/work/android_example
    2. package name: org.example.helloworld
    3. activity name: helloworld

    or
    android create project -n helloworld -t 1 -p ./ -k org.example.helloworld -a helloworld

  • Build and install package
    C-x C-f PATH-TO-PROJECT and M-x android-build-debug
    and M-x android-ant-installd to install package

Date: 2013-11-30 六

Author: yannik

Org version 7.8.11 with Emacs version 24

Validate XHTML 1.0