I wanted to create an android apk file in react-native. I followed the instructions as per the link below
https://reactnative.dev/docs/signed-apk-android
- Generated upload key
- Added gradle variables
- Added signing config
this worked well but for below command I am getting an error
npx react-native run-android --variant=release
Error:
Task :app:installRelease FAILED
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 io.nativebase.market.geekyants.straptaxiapp signatures do not match previously installed version; ignoring!
Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 20s65 actionable tasks: 2 executed, 63 up-to-dateerror Could not install the app on the device, read the error above for details.Make sure you have an Android emulator running or a device connected and haveset up your Android development environment:https://facebook.github.io/react-native/docs/getting-started.htmlerror Command failed: ./gradlew app:installRelease. Run CLI with --verbose flag for more details.strong text
Please help..!