It provides support for create new avd, launch avd, create new android project, build and rebuild Android sdk project, build and rebuild Android ndk project, install and uninstall apk, run executable ndk project, output emulator log on emacs.
This toolkit tested on WindowsXP/7, Ubuntu11 with android-sdk and android-ndk-r7.
| Folder name | Description | |--------------------+----------------------------------------------------------------| | ndkscript | Shell script for toolkit | | --\ _adbt.sh | Shell script for text executable program on emulator | | --\ adr.sh | Shell script to install and run executable program on emulator | | --\ api.sh | Shell script to install apk on emulator | | --\ apu.sh | Shell script to uninstall apk on emulator | | --\ init.sh | Shell script to set environment variables for current shell | | --\ lgs.sh | Shell script to clean and start log of emulator | | --\ mhp.sh | Shell script for help | | --\ ndbr.sh | Shell script to build or rebuild program with NDK | | jni_template | Template folder for ndk project | | --\ Android.mk | Makefile for ndk project | | --\ Application.mk | Setting for ndk project | | --\ hello-jni.c | Code for lib | | --\ helloworld.cpp | Code for executable | | androidmk-mode.el | Emacs script for toolkit | | README.org | Readme | | ChangeLog | Change log | | LICENSE | License | | AUTHORS | Authors |
** For Windows users
Install [[http://www.gnu.org/software/emacs/][emacs]].
Install [[http://developer.android.com/sdk/index.html][android-sdk-windows]].
Install [[http://developer.android.com/sdk/ndk/index.html][android-ndk-windows]].
Install [[http://ant.apache.org/bindownload.cgi][ant]].
Add ant bin folder to PATH.
(setenv "PATH" (concat "c:/apache-ant-1.8.2/bin/;" (getenv "PATH")))
Install [[http://cygwin.com/install.html][cygwin]].
Set up cygwin for emacs.
(when (eq system-type 'windows-nt) (require 'cygwin-mount) (cygwin-mount-activate) (add-hook 'comint-output-filter-functions 'shell-strip-ctrl-m nil t) (add-hook 'comint-output-filter-functions 'comint-watch-for-password-prompt nil t) (setq explicit-shell-file-name "bash.exe") ;; For subprocesses invoked via the shell ;; (e.g., "shell -c command") (setq shell-file-name explicit-shell-file-name))
Set some defvar.
;; Do not use '\' instead '/' (if (eq system-type 'windows-nt) (progn (setq android-ndk-root-path "e:/zxy/home/program/android-ndk-r7-windows") (setq android-sdk-root-path "e:/zxy/home/program/android-sdk-windows")) ;; Ubuntu do not understanding '~' instead of 'home' (progn (setq android-ndk-root-path "/home/share/program/android-ndk-r7-linux") (setq android-sdk-root-path "/home/share/program/android-sdk-linux"))) (setq android-default-package "com.zxy")
Add android-emacs-toolkit to emacs.
(add-to-list 'load-path "c:/android-emacs-toolkit") (require 'androidmk-mode) (add-hook 'androidmk-mode-hook (lambda () (progn (local-set-key [M-f5] 'androidndk-build) (local-set-key [M-S-f5] 'androidndk-rebuild) (local-set-key [C-f5] 'androidsdk-build) (local-set-key [C-S-f5] 'androidsdk-rebuild) )))
[[*RUNNING%20EXAMPLES][RUNNING EXAMPLES]]
** For Ubuntu users
Install [[http://www.gnu.org/software/emacs/][emacs]] (sudo apt-get install emacs).
Install [[http://developer.android.com/sdk/index.html][android-sdk-linux]].
Install [[http://developer.android.com/sdk/ndk/index.html][android-ndk-linux]].
Install [[http://ant.apache.org/bindownload.cgi][ant]].
Set some defvar.
;; Do not use '\' instead '/' (if (eq system-type 'windows-nt) (progn (setq android-ndk-root-path "e:/zxy/home/program/android-ndk-r7-windows") (setq android-sdk-root-path "e:/zxy/home/program/android-sdk-windows")) ;; Ubuntu do not understanding '~' instead of 'home' (progn (setq android-ndk-root-path "/home/share/program/android-ndk-r7-linux") (setq android-sdk-root-path "/home/share/program/android-sdk-linux"))) (setq android-default-package "com.zxy")
Add android-emacs-toolkit to emacs.
(add-to-list 'load-path "c:/android-emacs-toolkit") (require 'androidmk-mode) (add-hook 'androidmk-mode-hook (lambda () (progn (local-set-key [M-f5] 'androidndk-build) (local-set-key [M-S-f5] 'androidndk-rebuild) (local-set-key [C-f5] 'androidsdk-build) (local-set-key [C-S-f5] 'androidsdk-rebuild) )))
[[*RUNNING%20EXAMPLES][RUNNING EXAMPLES]]
Create new android avd.
M-x android-create-avd
Input avd name.
Launch android avd.
M-x android-launch-avd
Input avd name.
Output log.
M-x android-start-log
Create new android project.
M-x android-new-project
Input project path, project name, project target, project pachage, project activity and whether create jni folder. Then java file is open.
Build project with ant and install.
M-x androidsdk-build
Hello world will print on emulator.
Build ndk project with ndk-build and run.
M-x androidndk-build
Hello world will print on android-log buffer.
[[file:preview.gif][preview.gif]]
You can find more information at the project website
http://code.google.com/p/android-emacs-toolkit/
This toolkit is licensed under the GPL v3.