Step 1. Setup the Environment Variable
In the Windows Environment
DEV_CPP_HOME= C:\dev-cpp\bin
ANT_HOME= c:\ant
ANDROID_HOME=c:\android-sdk
JAVA_HOME = c:\jdk-1.6
PATH=%DEV_CPP_HOME%\bin;
%JAVA_HOME%\bin;
%ANDROID_HOME%\tools;
%ANT_HOME%\bin;
Step 2. Create Project
android create project \
--target 11 \ ( 11 for android 2.2 )
--name MyFirstActivity\
--path ./helloworld \
--activity MyFirstActivity \
--package idv.example.anr
Step 3. Write the Makefile
//Makefile is in the android project /helloworld all:
ant debug
ant install
adb shell am start -n idv.example.anr/idv.example.anr.MyFirstActivity
Step 4. Make it.
//Makefile is in the android project
open the AVD ( android 2.2 )
and in the /helloworld, type make
沒有留言:
張貼留言