Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'. #6640
Answered
by
magidin91
hassenhassen1
asked this question in
Q&A
-
I am having issues with reanimated for some reason Here is the error message > Task :react-native-reanimated:compileDebugJavaWithJavac FAILED
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:440: error: : expected
case "opacity" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:440: error: illegal start of expression
case "opacity" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:443: error: : expected
case "zIndex" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:443: error: illegal start of expression
case "zIndex" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:446: error: : expected
case "width" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:446: error: illegal start of expression
case "width" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:449: error: : expected
case "height" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:449: error: illegal start of expression
case "height" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:452: error: : expected
case "top" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:452: error: illegal start of expression
case "top" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:455: error: : expected
case "left" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:455: error: illegal start of expression
case "left" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:458: error: : expected
case "backgroundColor" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:458: error: illegal start of expression
case "backgroundColor" -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:472: error: : expected
default -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:472: error: illegal start of expression
default -> {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:492: error: : expected
case Boolean -> copy.pushBoolean(array.getBoolean(i));
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:493: error: : expected
case String -> copy.pushString(array.getString(i));
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:494: error: : expected
case Null -> copy.pushNull();
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:495: error: : expected
case Number -> copy.pushDouble(array.getDouble(i));
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:496: error: : expected
case Map -> copy.pushMap(copyReadableMap(array.getMap(i)));
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:497: error: : expected
case Array -> copy.pushArray(copyReadableArray(array.getArray(i)));
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:498: error: : expected
default -> throw new IllegalStateException("[Reanimated] Unknown type of ReadableArray.");
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:498: error: illegal start of expression
default -> throw new IllegalStateException("[Reanimated] Unknown type of ReadableArray.");
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:356: error: ')' expected
if (props.get(Snapshot.TRANSFORM_MATRIX) instanceof ReadableNativeArray matrixArray) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:356: error: not a statement
if (props.get(Snapshot.TRANSFORM_MATRIX) instanceof ReadableNativeArray matrixArray) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:356: error: ';' expected
if (props.get(Snapshot.TRANSFORM_MATRIX) instanceof ReadableNativeArray matrixArray) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:361: error: 'else' without 'if'
} else {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:540: error: ')' expected
if (view instanceof ViewGroup viewGroup) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:540: error: not a statement
if (view instanceof ViewGroup viewGroup) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:540: error: ';' expected
if (view instanceof ViewGroup viewGroup) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:590: error: ')' expected
if (view instanceof ViewGroup viewGroup) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:590: error: not a statement
if (view instanceof ViewGroup viewGroup) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:590: error: ';' expected
if (view instanceof ViewGroup viewGroup) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:615: error: ')' expected
if (!(exitingView.getParent() instanceof View parent)) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:615: error: not a statement
if (!(exitingView.getParent() instanceof View parent)) {
^
/Users/admin/Desktop/dev/test/react-native/new-curb-app/curb/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java:615: error: ';' expected
if (!(exitingView.getParent() instanceof View parent)) {
^
37 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details. Here is part of my package.json "dependencies": {
"@hookform/resolvers": "^3.9.0",
"@react-native-community/geolocation": "^3.4.0",
"@react-navigation/drawer": "^6.7.2",
"@react-navigation/material-top-tabs": "^6.6.13",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.11.0",
"react": "18.2.0",
"react-hook-form": "^7.53.1",
"react-native": "0.72.10",
"react-native-bootsplash": "^5.4.1",
"react-native-dropdown-picker": "^5.4.6",
"react-native-gesture-handler": "^2.20.2",
"react-native-image-crop-picker": "^0.40.2",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-maps": "^1.11.3",
"react-native-pager-view": "^6.2.2",
"react-native-reanimated": "^3.16.1",
"react-native-safe-area-context": "^4.7.2",
"react-native-screens": "^3.25.0",
"react-native-size-matters": "^0.4.2",
"react-native-tab-view": "^3.5.2",
"zod": "^3.23.8"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/preset-env": "^7.26.0",
"@babel/runtime": "^7.26.0",
"@react-native/eslint-config": "^0.72.2",
"@react-native/metro-config": "^0.72.11",
"@testing-library/react-native": "^12.4.5",
"@tsconfig/react-native": "^3.0.2",
"@types/jest": "^29.5.5",
"@types/react": "^18.2.25",
"@types/react-native-vector-icons": "^6.4.18",
"@types/react-test-renderer": "^18.0.3",
"babel-jest": "^29.2.1",
"babel-plugin-module-resolver": "^5.0.0",
"eslint": "^8.19.0",
"eslint-plugin-testing-library": "^6.2.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "0.76.8",
"prettier": "^2.4.1",
"react-native-vector-icons": "^10.2.0",
"react-test-renderer": "18.3.1",
"typescript": "^5.6.3"
},
"engines": {
"node": ">=16"
} Here is my android/build.gradle file // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
compileSdkVersion = 34
targetSdkVersion = 34
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
// ADD THIS
maven { url 'https://maven.google.com' }
// ADD THIS
maven { url "https://www.jitpack.io" }
}
dependencies {
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
}
} Has anyone else experienced this? I am very confused |
Beta Was this translation helpful? Give feedback.
Answered by
magidin91
Nov 1, 2024
Replies: 1 comment 2 replies
-
the same problem |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
react-native-reanimated 3.16.* Not compatible with react native 0.72 and below. Installed react-native-reanimated 3.15.5 - the problem is gone