Skip to content

Instantly share code, notes, and snippets.

@suryakencana007
Last active March 2, 2018 19:41
Show Gist options
  • Save suryakencana007/491407f7b15dc9f10fb36ad0fa4e6993 to your computer and use it in GitHub Desktop.
Save suryakencana007/491407f7b15dc9f10fb36ad0fa4e6993 to your computer and use it in GitHub Desktop.
React Native CLi BUG
latest React-Native Cli fallow below Command in mac terminal run on android device
step1: If not than (in project directory) mkdir android/app/src/main/assets
step2: react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
step3: react-native run-android
react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
How to fix “Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]”
It happened to me a few days ago. The problem was caused by using different versions of Android SDK build tool to build Xamarin.Android apps (at home I’m using v24.0.1 while at the office I’m using v23.0.3). It can be fixed by uninstalling the app manually (if it shows in application list) or re-building the app with the last Android SDK build tool you used then uninstall it manually (as the app is uninstalled improperly, it still in your device but doesn’t show up in application list). After that you can build with the other build tool.
But in the worst case the app doesn’t show up on your application list and you don’t want to waste your time to install the other build tool to just buid it to uninstall, the adb tool will be the rescuer if you follow below steps:
Plug your device into your computer (Make sure you enabled Developer mode first).
From command line, you enter “adb devices”. It should list all the “devices” (included emulators) are connected to your computer.
Run “adb -s {DEVICE_ID} uninstall {APP_PACKAGE_NAME}” with {DEVICE_ID} is the device’s id you can get from second step and {APP_PACKAGE_NAME} is application package name.
adb tool will uninstall the app then you can build your app with new build tool.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment