Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ca07396

Browse files
committed
Common commands for building and running Android projects command line
1 parent ee9820f commit ca07396

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

ANDROID.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Android Related Commands
2+
3+
For building a project command line and starting Android Instrumentation Tests.
4+
5+
## Build
6+
7+
```bash
8+
./gradlew :app:assembleAndroidTest
9+
./gradlew :app:assembleDebug
10+
```
11+
12+
## Install
13+
14+
```bash
15+
adb install -r app/build/outputs/apk/stable/debug/app-debug.apk
16+
adb install -r app/build/outputs/apk/androidTest/stable/debug/app-debug-androidTest.apk
17+
```
18+
19+
## Check Connected Devices
20+
21+
```bash
22+
adb devices
23+
```
24+
25+
## Validate
26+
27+
```bash
28+
adb shell pm list packages | grep com.example.app
29+
```
30+
31+
## Start Test
32+
33+
```bash
34+
adb shell am instrument -w com.exanmple.app.debug.test/androidx.test.runner.AndroidJUnitRunner
35+
```
36+
37+
## Restart ADB
38+
39+
```bash
40+
adb kill-server
41+
adb start-server
42+
```

0 commit comments

Comments
 (0)