`BUILD FAILED in 2s error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:configureCMakeDebug[arm64-v8a]'.
[CXX1214] /Users/hein/Documents/Projects/ScorpioApp/node_modules/react-native/ReactAndroid/cmake-utils/default-app-setup/CMakeLists.txt debug|arm64-v8a : User has minSdkVersion 22 but library was built for 24 [//ReactAndroid/hermestooling] * 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 2s.
I tried to run with
sudo npm run android`
Resolved by following steps
Remove the build and .cxx folder in the android/app/ directory.
Run the command in terminal:
cd android
./gradlew clean
Change in file
Open "android/gradle.properties" file
Change "newArchEnabled=true" to "newArchEnabled=false"
ones it done try to restart our system and then run