「Android/開発環境/AndroidStudio/apkコマンドインストール」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→apkは以下のようにコマンドでインストールできる) |
(→apkは以下のようにコマンドでインストールできる) |
||
| (同じ利用者による、間の8版が非表示) | |||
| 行1: | 行1: | ||
==apkは以下のようにコマンドでインストールできる== | ==apkは以下のようにコマンドでインストールできる== | ||
| − | adb install ~/MyHogeApplication/app/release/release/app.aab | + | adb install ~/MyHogeApplication/app/release/app-release.apk |
| + | |||
| + | ===INSTALL_FAILED_ALREADY_EXISTSエラーが出る場合=== | ||
| + | INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install jp.co.hogehoge1 without first uninstalling. | ||
| + | -rをつける | ||
| + | adb install -r ~/MyHogeApplication/app/release/app-release.apk | ||
| + | |||
| + | ==adbの場合はapkにしてからインストール== | ||
| + | macであれば以下でまずツールの準備 | ||
| + | <pre> | ||
| + | brew install bundletool | ||
| + | </pre> | ||
| + | 以下でaabをapkへ変換 | ||
| + | <pre> | ||
| + | bundletool build-apks --bundle=app.aab \ | ||
| + | --output=app.apk \ | ||
| + | --ks=/Users/[user]/.android/debug.keystore \ | ||
| + | --ks-pass=pass:android \ | ||
| + | --ks-key-alias=androiddebugkey \ | ||
| + | --key-pass=pass:android | ||
| + | </pre> | ||
| + | apkインストール | ||
| + | <pre> | ||
| + | bundletool install-apks --apks=app.apk | ||
| + | </pre> | ||
| + | |||
| + | ==adbを使ってアンインストール== | ||
| + | adb uninstall com.example.app1 | ||
| + | |||
| + | ==adbからテキスト入力== | ||
| + | adb shell input text hogehoge; // 文字入力 | ||
| + | adb shell input keyevent ENTER; // enter入力 | ||
| + | adb shell input keyevent KEYCODE_TAB; // tab入力 | ||
2021年1月20日 (水) 12:42時点における最新版
目次
apkは以下のようにコマンドでインストールできる
adb install ~/MyHogeApplication/app/release/app-release.apk
INSTALL_FAILED_ALREADY_EXISTSエラーが出る場合
INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install jp.co.hogehoge1 without first uninstalling.
-rをつける
adb install -r ~/MyHogeApplication/app/release/app-release.apk
adbの場合はapkにしてからインストール
macであれば以下でまずツールの準備
brew install bundletool
以下でaabをapkへ変換
bundletool build-apks --bundle=app.aab \
--output=app.apk \
--ks=/Users/[user]/.android/debug.keystore \
--ks-pass=pass:android \
--ks-key-alias=androiddebugkey \
--key-pass=pass:android
apkインストール
bundletool install-apks --apks=app.apk
adbを使ってアンインストール
adb uninstall com.example.app1
adbからテキスト入力
adb shell input text hogehoge; // 文字入力 adb shell input keyevent ENTER; // enter入力 adb shell input keyevent KEYCODE_TAB; // tab入力
