Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working with react native 0.69.0-rc.6 for react-native-reanimated 3.0.0-rc.0 on android #3305

Closed
1 of 3 tasks
xiongemi opened this issue Jun 22, 2022 · 17 comments
Closed
1 of 3 tasks
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: Android This issue is specific to Android

Comments

@xiongemi
Copy link

Description

try react native 0.69.0-rc.6. throw an error with react-native-reanimated 3.0.0-rc.0 on android.

error:

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/emilyxiong/Code/tmp/studio-ghibli-search-engine/node_modules/react-native-reanimated/android/build.gradle' line: 541

* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> Expected directory '/Users/emilyxiong/Code/tmp/studio-ghibli-search-engine/node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.

* 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 18s

    at makeError (/Users/emilyxiong/Code/tmp/studio-ghibli-search-engine/node_modules/execa/index.js:174:9)
    at /Users/emilyxiong/Code/tmp/studio-ghibli-search-engine/node_modules/execa/index.js:278:16
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async runOnAllDevices (/Users/emilyxiong/Code/tmp/studio-ghibli-search-engine/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
    at async Command.handleAction (/Users/emilyxiong/Code/tmp/studio-ghibli-search-engine/node_modules/@react-native-community/cli/build/index.js:192:9)

my complete dependencies:

 "dependencies": {
    "@emotion/react": "11.9.3",
    "@emotion/styled": "11.9.3",
    "@mui/icons-material": "^5.8.0",
    "@mui/material": "^5.8.1",
    "@react-navigation/native": "^6.0.10",
    "@react-navigation/native-stack": "^6.6.2",
    "@reduxjs/toolkit": "1.8.2",
    "@storybook/core-server": "6.5.9",
    "connected-react-router": "^6.9.2",
    "core-js": "^3.6.5",
    "formik": "^2.2.9",
    "formik-mui": "^4.0.0-alpha.3",
    "history": "^5.3.0",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-native": "0.0.0-20220614-2054-bcc69dfb3",
    "react-native-paper": "^4.12.1",
    "react-native-safe-area-context": "^4.2.5",
    "react-native-screens": "^3.13.1",
    "react-native-vector-icons": "^9.1.0",
    "react-native-web": "^0.17.7",
    "react-redux": "8.0.2",
    "react-router-dom": "^6.3.0",
    "redux-persist": "^6.0.0",
    "regenerator-runtime": "0.13.7",
    "tslib": "^2.0.0",
    "@storybook/builder-webpack5": "~6.5.4",
    "@storybook/manager-webpack5": "~6.5.4"
  },
  "devDependencies": {
    "@nrwl/cypress": "14.3.6",
    "@nrwl/detox": "14.3.6",
    "@nrwl/eslint-plugin-nx": "14.3.6",
    "@nrwl/jest": "14.3.6",
    "@nrwl/linter": "14.3.6",
    "@nrwl/react": "14.3.6",
    "@nrwl/react-native": "14.3.6",
    "@nrwl/storybook": "14.3.6",
    "@nrwl/web": "14.3.6",
    "@nrwl/workspace": "14.3.6",
    "@react-native-async-storage/async-storage": "1.17.6",
    "@react-native-community/cli": "8.0.2",
    "@react-native-community/cli-platform-android": "8.0.2",
    "@react-native-community/cli-platform-ios": "8.0.2",
    "@react-native-masked-view/masked-view": "^0.2.6",
    "@storybook/addon-essentials": "6.5.9",
    "@storybook/addon-ondevice-actions": "6.0.1-beta.6",
    "@storybook/addon-ondevice-backgrounds": "6.0.1-beta.6",
    "@storybook/addon-ondevice-controls": "6.0.1-beta.6",
    "@storybook/addon-ondevice-notes": "6.0.1-beta.6",
    "@storybook/react": "6.5.9",
    "@storybook/react-native": "6.0.1-beta.6",
    "@testing-library/jest-dom": "5.16.1",
    "@testing-library/jest-native": "4.0.5",
    "@testing-library/react": "13.3.0",
    "@testing-library/react-native": "9.1.0",
    "@types/jest": "27.4.1",
    "@types/jest-axe": "^3.5.3",
    "@types/lodash": "^4.14.176",
    "@types/node": "18.0.0",
    "@types/react": "18.0.13",
    "@types/react-dom": "18.0.5",
    "@types/react-native": "0.67.8",
    "@types/react-router-dom": "5.3.3",
    "@types/redux-logger": "^3.0.9",
    "@types/redux-mock-store": "^1.0.3",
    "@types/string-similarity": "^4.0.0",
    "@typescript-eslint/eslint-plugin": "5.24.0",
    "@typescript-eslint/parser": "5.24.0",
    "babel-jest": "28.1.0",
    "babel-plugin-module-resolver": "^4.1.0",
    "babel-plugin-react-native-web": "^0.17.7",
    "cypress": "^8.3.0",
    "cypress-axe": "^0.13.0",
    "detox": "19.7.1",
    "eslint": "8.15.0",
    "eslint-config-prettier": "8.1.0",
    "eslint-plugin-cypress": "^2.10.3",
    "eslint-plugin-import": "2.26.0",
    "eslint-plugin-jsx-a11y": "6.5.1",
    "eslint-plugin-react": "7.30.0",
    "eslint-plugin-react-hooks": "4.6.0",
    "gh-pages": "^3.2.3",
    "jest": "27.5.1",
    "jest-axe": "^6.0.0",
    "jest-circus": "27.2.3",
    "jest-react-native": "18.0.0",
    "lodash": "^4.17.21",
    "metro": "0.71.1",
    "metro-babel-register": "0.71.1",
    "metro-minify-uglify": "^0.71.1",
    "metro-react-native-babel-preset": "0.71.1",
    "metro-resolver": "0.71.1",
    "metro-transform-worker": "^0.71.1",
    "nx": "14.3.6",
    "prettier": "2.7.1",
    "react-native-config": "1.4.6",
    "react-native-gesture-handler": "^2.4.2",
    "react-native-reanimated": "^3.0.0-rc.0",
    "react-native-storybook-loader": "^2.0.5",
    "react-native-style-tachyons": "^4.2.1",
    "react-native-svg": "12.3.0",
    "react-native-svg-transformer": "1.0.0",
    "react-refresh": "~0.10.0",
    "react-test-renderer": "18.2.0",
    "redux-logger": "^3.0.6",
    "redux-mock-store": "^1.5.4",
    "string-similarity": "^4.0.4",
    "stringify-entities": "^4.0.2",
    "truncate": "^3.0.0",
    "ts-jest": "27.1.4",
    "typescript": "4.7.4",
    "webpack-bundle-analyzer": "^4.5.0"
  }

Expected behavior

should be able run with react nativev 0.69.0

Actual behavior & steps to reproduce

Snack or minimal code example

Package versions

name version
react-native 0.69.0-rc.6
react-native-reanimated 3.0.0-rc.0
NodeJS v14.17.0
Xcode
Java
Gradle 7.3.3
expo

Affected platforms

  • Android
  • iOS
  • Web
@xiongemi xiongemi added the Needs review Issue is ready to be reviewed by a maintainer label Jun 22, 2022
@xiongemi xiongemi changed the title not working for react native 0.69.0-rc.6 for react-native-reanimated 3.0.0-rc.0 on android not working with react native 0.69.0-rc.6 for react-native-reanimated 3.0.0-rc.0 on android Jun 22, 2022
@github-actions github-actions bot added Platform: Android This issue is specific to Android Missing info The user didn't precise the problem enough labels Jun 22, 2022
@github-actions
Copy link

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Snack or minimal code example section.

@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Jun 22, 2022
@github-actions
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snippet of code, a snack or a link to a GitHub repository that reproduces the problem?

@cuongtq100
Copy link

the same! need help

image

@cmdparkour
Copy link

i meet the same question like the first message, when i upgrade with react-native, it can't work as i want.

@muhyirasyidin
Copy link

same!

Screen Shot 2022-06-23 at 10 58 01

@cmdparkour
Copy link

i think the question is about this in android/build.gradle
image

@cmdparkour
Copy link

but i don't know how to fix it in the build.gradle

@cmdparkour
Copy link

i fixed it by change the "//.arr" to "react-native///.aar" in the file: android/build.gradle

@cmdparkour
Copy link

because the findTree.singleFile is a single file choose, but can't find the path when the rn upgrade

@drante
Copy link

drante commented Jun 23, 2022

I don't think the latest stable version 2.8.0 supports react-native 0.69.0. Until v3 is released, you can try installing the 3.0.0-rc.0 version.

yarn add react-native-reanimated@next

@xiongemi
Copy link
Author

@drante i tried with version 3.0.0-rc.0, still does not work with 0.69.0 on android.

@drante
Copy link

drante commented Jun 23, 2022

@drante i tried with version 3.0.0-rc.0, still does not work with 0.69.0 on android.

Do you get the same errors?

@xiongemi
Copy link
Author

@drante i got the same error. as @cmdparkour mentioned above, the error is with react-native-reanimated android/build.gradle, need tochange the "//.arr" to "react-native///.aar" in the file: android/build.gradle/

@sagark1510
Copy link

I got the issue with iOS while using 3.0.0-rc.0 with RN 0.69.0

anybody have any idea?

@graszka22
Copy link
Member

Ok, first of all, if you want to use RN 0.69, use reanimated 3.0.0-rc.0. Versions 2.x of reanimated don't support RN 0.69 and there will be a warning about this and it will be mentioned in the docs. This should fix the error with rnMinorVersion

About the error from the issue:
Expected directory '/Users/emilyxiong/Code/tmp/studio-ghibli-search-engine/node_modules/react-native/android' to contain exactly one file, however, it contains more than one file.
This is because according to your package.json you're using an alpha version of RN ("0.0.0-20220614-2054-bcc69dfb3") and not the stable version ("0.69.0"). In our gradle file there is a code like this:

def rnAarMatcher = "**/react-native/**/*${buildType}.aar"
    if (rnMinorVersion < 69) {
        rnAarMatcher = "**/**/*.aar"
    }
def rnAAR = fileTree("$reactNative/android").matching({ it.include rnAarMatcher }).singleFile

So if you're using an alpha version, the rnMinorVersion is 0, the regex is set to "**/**/*.aar" and it detects also hermes aars. So the workaround for now would be changing that regex or using 0.69 version of RN.
It should work with the alpha version though, so we need to fix it.

@sagark1510 your issue is unrelated to this one and will be fixed with this pr: #3314

@graszka22 graszka22 removed Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Missing info The user didn't precise the problem enough labels Jun 29, 2022
@hadnet
Copy link

hadnet commented Aug 30, 2022

I'm getting the same error as you (using reanimated ^3.0.0-rc.0 and RN 0.69.3). Did you find a solution to this issue @sagark1510 ?

@loyalty-thameem
Copy link

same!

Screen Shot 2022-06-23 at 10 58 01

Yes, same to me.

@Latropos Latropos added the Close when stale This issue is going to be closed when there is no activity for a while label Oct 16, 2023
@github-actions github-actions bot closed this as completed Nov 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

10 participants