Commit 15c53d7
fix: prevent run-android failure when updating APK (#323)
Summary:
---------
If we run `react-native run-android` while it's already installed, it will fail with the following error.
```bash
info Installing the app on the device (cd android && adb -s emulator-5554 install app/build/outputs/apk/debug/app-x86-debug.apk
adb: failed to install app/build/outputs/apk/debug/app-x86-debug.apk: Failure [INSTALL_FAILED_ALREADY_EXISTS: Attempt to re-install me.mycake without first uninstalling.]
```
In the development phase, I think using adb's install options below is much more efficient.
```
-r : Reinstall an existing app, keeping its data.
-d : Allow version code downgrade.
```
Test Plan:
----------
Not required.1 parent 835b1e3 commit 15c53d7
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
0 commit comments