Android Build Commands

Install apk

adb install 

 

In case that you have both simulator and device connected but you want to install the app on device, then use the global option “-d” just right after the “adb” command will help.

-d      use USB device (error if multiple devices connected)

Update existing apk on device.

adb -d install -r 

Uninstall apk

uninstall [-k] PACKAGE
     remove this app package from the device
     '-k': keep the data and cache directories

Run instrumented tests

Run all tests

./gradlew connectedAndroidTest

Run a particular test class

./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.ExampleTest

Run a particular test case

./gradlew connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.example.android.ExampleTest#testCase_001

 

 

 

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s