react-native-reanimated: App does not build because of react-native-reanimated
Description
When compiling my app, React Native Reanimated gives an error in the build.gradle file:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/home/mart/git/community_app_github/node_modules/react-native-reanimated/android/build.gradle' line: 21
* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> Plugin with id 'maven' not found.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> compileSdkVersion is not specified. Please add it to build.gradle
* 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 4s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/7.0/userguide/command_line_interface.html#sec:command_line_warnings
I tried running npm update --force
, but this gave an error of abs
not being defined, with no js source files I can find.
Package versions
- React Native: ^0.63.4
- React Native Reanimated: ^1.8.0
- NodeJS: 12.16.1
- Xcode: N/A
- Java & Gradle: Java 16 (java-16-jdk), Gradle 7.0
Affected platforms
- Android
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 30 (5 by maintainers)
Until version 1.13.3, react-native reanimated didn’t support Gradle 7+. But since version
1.13.4
it’s possible !yarn add react-native-reanimated@1.13.4
Should have built in Flutter
Unfortunately, we no longer support Reanimated v1 😕
Was anyone able to fix this issue?
working…
I am downgrading to reanimate 1 because we can’t do debugging in reanimate 2 But i am facing the same error
Not every module out there supports hermes yet. You can’t just drop support for god knows how many production apps still using v1. I’ve been stuck for 2 days now and it doesn’t look like I’m making any progress what so ever.
No, I didn’t catch that you’re using npm since most RN apps are using yarn.
So you managed to get past Gradle install and Metro server was using a stale cache. Try running your app with
npm run start --reset-cache
or manually adding--reset-cache
flag in the package.json instart
script section.Did you check if Reanimated version was in fact bumped to a newer one?
Getting error
after upgrading my react native version to 0.70.6, using “react-native-reanimated”: “^1.9.0”
@hugoh59 I updated to latest version and its working
“react-native-reanimated”: “^2.13.0”,
I am getting same error during android build using
eas build
Environment
Error
So it seems the
maven
plugin is deprecated in gradle 7 (in favor of maven-publish), but gradle 6.8.3 does not seem to support java 16