おやじ臭いトーク

← newer [ 2011-7 ][ 2011-6 ] older →

Android開發筆記

以下是小弟開發android不用eclipse,只靠ant和adb之下,常用的指令:

compile和安裝

ant compile 
ant clean
ant debug/ ant release (只生apk)
ant install (把debug版apk裝到emulator)

安裝,移除

adb install xxx.apk (安裝xxx.apk)
adb uninstall com.your.package (移除該program)

啟動app要用am command,假設package name是com.your.package,main activity叫LaunchActivity,啟動app就用:

adb shell am start -a android.intent.action.MAIN -n \
com.your.package/.LaunchActivity

執行unit test也是用am command

adb shell am instrument -w \
com.your.package.test/android.test.InstrumentationTestRunner

只執行其中一個test class的話:

adb shell am instrument -w -e com.your.package.test/TestCaseClass \
com.your.package.test/android.test.InstrumentationTestRunner

以上。

では、ごきげんよう

CatG [Permalink]

Thu, 21 Jul 2011 03:46:13 +0800

← newer [ 2011-7 ][ 2011-6 ] older →

2017: 8 7 6 5 4 3 2 1
2016: 12 11 10 9 8 7 6 5 4 3 2 1
2015: 12 11 10 9 8 7 6 5 4 3 2 1
2014: 12 11 10 9 8 7 6 5 4 3 2 1
2013: 12 11 10 9 8 7 6 5 4 3 2 1
2012: 12 11 10 9 8 7 6 5 4 3 2 1
2011: 12 11 10 9 8 7 6 5 4 3 2 1
2010: 12 11 10 9 8 7 6 5 4 3 2 1
2009: 12 11 10 9 8 7 6 5 4 3 2 1
2008: 12 11 10 9 8 7 6 5 4 3 2 1
2007: 12 11 10 9 8 7 6 5 4 3 2 1
2006: 12 11 10 9 8 7 6 5 4 3 2 1
2005: 12 11 10 9 8 7 6 5 4 3 2 1
2004: 12 11 10 9 8 7 6 5 4 3

Plurk.com
Execution time is 0.0014128684997559 seconds.

Valid CSS! Valid HTML 4.01!