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
- Download android mode
https://github.com/remvee/android-mode - Config Elisp:
(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
- input project path: /home/yannik/work/android_example
- package name: org.example.helloworld
- activity name: helloworld
or
android create project -n helloworld -t 1 -p ./ -k org.example.helloworld -a helloworld - input project path: /home/yannik/work/android_example
- 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