Skip to content

Commit bdb668f

Browse files
authored
update "adb install" to use "-r" (reinstall) pass -r to adb install (#103)
resolve INSTALL_FAILED_ALREADY_EXISTS on Android 8 (or below). does not affect initial install.
1 parent 8a1bbe9 commit bdb668f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/androidbuild/tools.zig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ pub fn adbInstall(sdk: *Sdk, apk: LazyPath) void {
203203
}
204204

205205
/// Install an APK onto your Android device or emulator
206-
/// ie. "adb install ./zig-out/bin/minimal.apk"
206+
/// ie. "adb install -r ./zig-out/bin/minimal.apk"
207207
pub fn addAdbInstall(sdk: *Sdk, apk: LazyPath) *Step.Run {
208208
const b = sdk.b;
209209
if (sdk.platform_tools.adb.len == 0) {
@@ -212,6 +212,7 @@ pub fn addAdbInstall(sdk: *Sdk, apk: LazyPath) *Step.Run {
212212
const adb_install = b.addSystemCommand(&.{
213213
sdk.platform_tools.adb,
214214
"install",
215+
"-r",
215216
});
216217
adb_install.addFileArg(apk);
217218
return adb_install;

0 commit comments

Comments
 (0)