Sunday, July 29, 2012

How to build android project with Ant ?


Replace () with your own value

Step 1:  cd to project directory

Step 2: android update project -p .

Step 3: linux/unix: nano ant.properties  
            windows: notepad ant.properties

Step 4: input the following: 


  key.store=(path of key store file )/.keystore
  key.alias=(name of alias)
  key.store.password=(password of key store)
  key.alias.password=(password of key alias)

Step 5: 
ant release;
adb install -r bin/(generated file name).apk;
adb shell am start -a android.intent.action.MAIN -n (package name)/(package name).(activity name)

To make life easier, put step 5 inside a bash script and run it :)



Ant でAndroidプロジェクトをビルド方法:(in Japanese)
ーーーーーーーーーーーーーーーーーーー

Step 1: コマンドプロンプトで プロジェクトフォルダの中に移動する (cd コマンド)

Step 2: android update project -p .

Step 3: notepad ant.properties

Step 4:  下記を記載して保存
  key.store=??/.keystore
  key.alias=??
  key.store.password=??
  key.alias.password=??

Step 5: ant release;adb install -r bin/.apk;adb shell am start -a android.intent.action.MAIN -n package name/package name.activity name