I'm trying to run the following command to test the release version of my RN app locally:
react-native run-android --variant=release
Unfortunately, this fails to load the release version of the app into the emulator b/c it's failing with the following exception:
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:installRelease'.
com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.socialmerge signatures do not match previously installed version; ignoring!
Based on some googling I found the following thread:
Package signatures do not match the previously installed version
Some recommend uninstalling the previously installed version like this:
adb uninstall "com.MyDomain.MyApp"
I tried that as well as this:
adb uninstall com.MyDomain.MyApp
But both of these adb uninstall attempts return [DELETE_FAILED_INTERNAL_ERROR]. The following thread discusses the [DELETE_FAILED_INTERNAL_ERROR] error and some suggest disabling "Instant Run" in Android Studio. I have AS 3.5.2 and the closest match I can find to that are the following options which are unchecked by default:
- "Automatically perform "Run" when Apply Changes fails
- "Automatically perform "Run" when Apply Code Changes fails"
I'm assuming that these ^^^ options replace the previous "Instant Run" option but both of these options are unselected by default so it appears that disabling "Instant Run" is no longer relevant to debugging this issue. Any recommendations on next steps for debugging this issue?