react-native-reanimated: Cannot build project with RN 0.69.0 , Could not get unknown property 'rnMinorVersion'
Description
react-native-reanimated throws error “Could not get unknown property ‘rnMinorVersion’ for project ‘:react-native-reanimated’ of type org.gradle.api.Project”
Expected behavior
Should build successfully
Actual behavior & steps to reproduce
Install react-native 0.69 and react-native-reanimated@2.6 and build package for debug
Snack or minimal code example
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\rn-69\node_modules\react-native-reanimated\android\build.gradle' line: 153
* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> Could not get unknown property 'rnMinorVersion' for project ':react-native-reanimated' of type org.gradle.api.Project.
* 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/
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
Package versions
name | version |
---|---|
react-native | 0.69 |
react-native-reanimated | 2.6.0 |
NodeJS | 16 |
Java | 8 |
Gradle | 8 |
Affected platforms
- Android
- iOS
- Web
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 5
- Comments: 21 (1 by maintainers)
Commits related to this issue
- Upgrade reanimated to v3 for Android build Related https://github.com/software-mansion/react-native-reanimated/issues/3310 — committed to dooboolab/homepage by hyochan 2 years ago
- Migrate proj to RN 0.69.2 (#26) * Upgrade react-native to 0.69.2 - Tested on iOS build * Upgrade reanimated to v3 for Android build - Related https://github.com/software-mansion/react-nati... — committed to dooboolab/homepage by hyochan 2 years ago
Changing these lines in
node_modules/react-native-reanimated/android/build.gradle
solved my problem:Rename
$rnMinorVersion
to$rnMinorVersionCopy
I don’t know if this is the right fix, but as it is a printed message, does not affect the overall build process.
Update react-native-reanimated to version to 3.0.0-rc.0 worked for me using
yarn add react-native-reanimated@next
.I think it’s not the best solution, but is the fastier for now.
new project
npx react-native init FoodApp3 --version 0.68.2
and done
use below patch
view patch
I tried uninstall of the npm package
npm uninstall react-native-reanimated
and installed it back again withnpm install react-native-reanimated
followed byThis resolved the error for me.
Same issues here. 2.8.0 fails to work with RN 0.69.0 and 3.0.0-rc.0 fails to compile with RN 0.69.0.
Details:
Fixed in the 2.9.0 - https://github.com/software-mansion/react-native-reanimated/releases/tag/2.9.0
in my case, i receive an error saying that the library “libfolly_json.so” not found
probably the lib needs a .aar to new react native version
0.69.0
as you can see in the image above, the arr’s go to until the 68 version
then, the library is not building for the new version, but to the version 68 i think the library needs to some updates to support the new react native version
i’m no sure
I had this problem only when i did try to upgrade react native version from 0.68.2 to the 0.69.0
I “fixed” this error by manually editing
node_modules/react-native-reanimated/android/build.gradle
This was a shot in the dark on my part, I have no idea if this is the right thing to do. If it is, I’m happy to open a PR that does this.