[Android] facing this issue :react-native-reanimated:assertMinimalReactNativeVersionTask FAILED #7434
Unanswered
devhaseebashraf
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Here is the complete error message
Android gradle plugin: 8.2.1
Gradle: 8.6
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.6/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
29 actionable tasks: 29 executed
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
FAILURE: Build failed with an exception.
Where:
Build file '/home/dev/Projects/IRP/mobile-app/node_modules/react-native-reanimated/android/build.gradle' line: 387
What went wrong:
Execution failed for task ':react-native-reanimated:assertMinimalReactNativeVersionTask'.
BUILD FAILED in 13s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installStagingDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where:
Build file '/home/dev/Projects/IRP/mobile-app/node_modules/react-native-reanimated/android/build.gradle' line: 387 * What went wrong:
Execution failed for task ':react-native-reanimated:assertMinimalReactNativeVersionTask'.
Here is the react-native npx info
`info Fetching system and libraries information...
System:
OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
Memory: 11.73 GB / 23.26 GB
Shell:
version: 5.1.16
path: /bin/bash
Binaries:
Node:
version: 18.20.8
path: ~/.nvm/versions/node/v18.20.8/bin/node
Yarn:
version: 3.6.4
path: ~/Projects/IRP/mobile-app/node_modules/.bin/yarn
npm:
version: 10.8.2
path: ~/.nvm/versions/node/v18.20.8/bin/npm
Watchman: Not Found
SDKs:
Android SDK:
API Levels:
- "34"
Build Tools:
- 34.0.0
- 35.0.1
- 36.0.0
System Images:
- android-36 | Google APIs Intel x86_64 Atom
Android NDK: Not Found
IDEs:
Android Studio: AI-243.24978.46.2431.13363775
Languages:
Java:
version: 17.0.14
path: /usr/lib/jvm/java-17-openjdk-amd64/bin/javac
Ruby:
version: 3.1.2
path: /home/dev/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.5
wanted: 0.74.5
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: false
`
And here is the package.json
{ "name": "InspectreplyAi", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android --mode=stagingDebug", "ios": "react-native run-ios", "start": "react-native start", "test": "jest", "clean": "cd android && ./gradlew clean && cd ..", "xcode": "xed -b ios", "pod": "cd ./ios && pod install", "lint": "./node_modules/.bin/eslint . --ext=tsx --ext=ts", "lint-fix": "./node_modules/.bin/eslint . --ext=tsx --ext=ts --fix", "lint-staged": "./node_modules/.bin/lint-staged", "lint-ts": "tsc -p tsconfig.json --noEmit", "postinstall": "husky install && npx patch-package", "prettier": "./node_modules/.bin/prettier --write js/", "android:build:dev": "cd android && ./gradlew assembleRelease", "pre-commit": "lint-staged", "setStaging": "ENVFILE=.env.staging", "setProduction": "ENVFILE=.env.production", "ios:prod": "react-native run-ios --scheme 'InspectreplyAiProduction'", "ios:stage": "react-native run-ios --scheme 'InspectreplyAiStaging'", "android:prod": "react-native run-android --mode=productionDebug", "android:prod-release": "react-native run-android --mode=productionRelease", "android:staging": "react-native run-android --mode=stagingRelease", "android:staging-release": "react-native run-android --mode=stagingDebug", "open-apk": "open ./android/app/build/outputs/apk/", "open-bundle": "open ./android/app/build/outputs/bundle/productionRelease", "androidProductionReleaseBundle": "yarn clean && cd android && ./gradlew bundleProductionRelease && killall -9 java && cd .. && open ./android/app/build/outputs/bundle/production/release", "androidProductionDebugAPK": "yarn clean && cd android && ./gradlew assembleProductionDebug && killall -9 java && cd .. && open ./android/app/build/outputs/apk/production/debug", "androidProductionReleaseAPK": "yarn clean && cd android && ./gradlew assembleProductionRelease && killall -9 java && cd .. && open ./android/app/build/outputs/apk/production/release", "androidStagingDebugAPK": "yarn clean && cd android && ./gradlew assembleStagingDebug && killall -9 java && open ./android/app/build/outputs/apk/staging/debug", "androidStagingReleaseAPK": "yarn clean && cd android && ./gradlew assembleStagingRelease && killall -9 java && cd .. && open ./android/app/build/outputs/apk/staging/release", "androidStagingReleaseBundle": "yarn clean && cd android && ./gradlew bundleStagingRelease && killall -9 java && cd .. && open ./android/app/build/outputs/bundle/staging/release" }, "dependencies": { "@gorhom/bottom-sheet": "^4.6.4", "@react-native-community/blur": "^4.4.0", "@react-native-community/netinfo": "^11.3.1", "@react-native-community/push-notification-ios": "^1.11.0", "@react-native-firebase/analytics": "^21.5.0", "@react-native-firebase/app": "^21.5.0", "@react-native-firebase/crashlytics": "^21.5.0", "@react-native-firebase/messaging": "^21.5.0", "@react-navigation/bottom-tabs": "^6.5.19", "@react-navigation/material-top-tabs": "^6.6.14", "@react-navigation/native": "^6.1.18", "@react-navigation/native-stack": "^6.11.0", "@react-navigation/stack": "^6.4.1", "@reduxjs/toolkit": "^2.2.7", "@types/react-native-background-timer": "2.0.2", "@types/redux-logger": "^3.0.9", "add": "^2.0.6", "apisauce": "^3.0.1", "axios": "^1.7.3", "formik": "^2.4.6", "lodash": "4.17.21", "moment": "^2.30.1", "react": "18.2.0", "react-native": "0.74.5", "react-native-background-timer": "2.4.1", "react-native-config": "^1.5.3", "react-native-device-info": "11.1.0", "react-native-document-picker": "^9.3.1", "react-native-element-dropdown": "^2.12.4", "react-native-fast-image": "^8.6.3", "react-native-formik": "^1.7.8", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.17.1", "react-native-iap": "^12.15.7", "react-native-image-crop-picker": "^0.40.0", "react-native-image-viewing": "^0.2.2", "react-native-iphone-x-helper": "^1.3.1", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-linear-gradient": "^2.8.3", "react-native-mmkv": "2.12.1", "react-native-modal": "13.0.1", "react-native-pager-view": "^6.4.0", "react-native-permissions": "^5.2.1", "react-native-push-notification": "^8.1.1", "react-native-raw-bottom-sheet": "^3.0.0", "react-native-reanimated": "^3.15.0", "react-native-safe-area-context": "^4.9.0", "react-native-screens": "^3.29.0", "react-native-share": "^12.0.3", "react-native-snackbar": "^2.6.2", "react-native-splash-screen": "^3.3.0", "react-native-svg": "^15.0.0", "react-native-svg-transformer": "^1.3.0", "react-native-tab-view": "^3.5.2", "react-native-toast-message": "^2.2.0", "react-native-walkthrough-tooltip": "^1.6.0", "react-native-webview": "^13.12.3", "react-redux": "^9.1.2", "redux": "5.0.1", "redux-logger": "3.0.6", "redux-persist": "6.0.0", "yarn": "^1.22.22", "yup": "^1.4.0" }, "lint-staged": { "scripts/**/*.{js,json}": [ "prettier --write ." ], "src/**/*.{js,ts,tsx,json}": [ "prettier --write .", "eslint --fix" ] }, "importSort": { ".js, .jsx, .ts, .tsx": { "style": "module", "parser": "typescript" } }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@innocells/branch-naming-check": "^1.0.0", "@react-native/babel-preset": "0.74.85", "@react-native/eslint-config": "0.74.85", "@react-native/metro-config": "0.74.85", "@react-native/typescript-config": "0.74.85", "@types/lodash": "^4.14.197", "@types/metro-config": "0.76.3", "@types/node": "18.14.1", "@types/react": "^18.2.6", "@types/react-native": "^0.72.2", "@types/react-native-dotenv": "^0.2.2", "@types/react-test-renderer": "^18.0.0", "@typescript-eslint/eslint-plugin": "^7.8.0", "@typescript-eslint/parser": "^7.8.0", "babel-eslint": "^10.1.0", "babel-jest": "^29.6.3", "babel-plugin-module-resolver": "^5.0.2", "eslint": "^8.57.0", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^18.0.0", "eslint-config-prettier": "^9.0.0", "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-etc": "^2.0.3", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-prettier": "^5.0.0", "eslint-plugin-react": "^7.33.2", "eslint-plugin-react-hooks": "^4.6.0", "husky": "^9.0.11", "import-sort-style-module": "^6.0.0", "jest": "^29.6.3", "lint-staged": "^15.2.2", "metro-react-native-babel-preset": "0.76.5", "prettier": "^3.2.5", "prettier-plugin-import-sort": "^0.0.7", "react-native-dotenv": "^3.4.10", "react-test-renderer": "18.2.0", "typescript": "5.0.4" }, "engines": { "node": ">=18" }, "packageManager": "[email protected]" }
And here is my app/build.gradle
`apply plugin: 'com.android.application'
apply from: project(':react-native-config').projectDir.getPath() + '/dotenv.gradle'
apply plugin: 'org.jetbrains.kotlin.android'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.facebook.react'
project.ext.envConfigFiles = [
stagingRelease :'.env.staging',
stagingDebug:'.env.staging',
productionDebug:'.env.production',
productionRelease:'.env.production'
]
/**
This is the configuration block to customize your React Native Android app.
By default you don't need to apply any configuration, just uncomment the lines you need.
/
react {
/ Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDidefaultConfigr = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]
/* Bundling */
// A list containing the node command and its flags. Default is just 'node'.
// nodeExecutableAndArgs = ["node"]
//
// The command to run when bundling. By default is 'bundle'
// bundleCommand = "ram-bundle"
//
// The path to the CLI configuration file. Default is empty.
// bundleConfig = file(../rn-cli.config.js)
//
// The name of the generated asset file containing your JS bundle
// bundleAssetName = "MyApplication.android.bundle"
//
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
// entryFile = file("../js/MyApplication.android.js")
//
// A list of extra flags to pass to the 'bundle' commands.
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
// extraPackagerArgs = []
/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
}
/**
*/
def enableProguardInReleaseBuilds = true
/**
def jscFlavor = 'org.webkit:android-jsc-intl:+'
Date.toLocaleString
andString.localeCompare
that*/
def jscFlavor = 'org.webkit:android-jsc:+'
android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdk rootProject.ext.compileSdkVersion
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation('com.facebook.react:react-android')
implementation('com.google.firebase:firebase-analytics')
implementation 'com.google.firebase:firebase-messaging:23.0.0'
}
apply from: file('../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle'); applyNativeModulesAppBuildGradle(project)
`
I have tried multiple solution, no luck so far
Steps to reproduce
Just simply run the yarn run android after installing the node modules, then it is giving me this error
But when I upgrade to react-native 0.75 version it the show me this error this error
> Task :app:generateAutolinkingPackageList FAILED
, I have found this solution on github solution but still is not helpful for meIs there anyone else facing the same issue, I have actually spent more than 20 hours on this specific issue
Beta Was this translation helpful? Give feedback.
All reactions