0
0

More than 3 years have passed since last update.

コマンドラインでAndroidアプリをビルドして起動し直す

Last updated at Posted at 2021-08-05
export APPLICATION_ID=com.example.myapplication
./gradlew assembleDebug; adb install -r app/build/outputs/apk/debug/app-debug.apk; adb shell am force-stop $APPLICATION_ID; adb shell monkey -p $APPLICATION_ID -c android.intent.category.LAUNCHER 1

たまにAndroid Studioのことが信じられなくなることがあって、そういう時はコマンドラインで一通りやりたくなる。アプリを起動する時に、Acitivityを指定する必要があるのかなと思ってたけど、monkeyというコマンドがあるのを知らなかった。

0
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0