Invalid RNReanimated.podspec file: [Reanimated] Unsupported React Native version. Please use 0.75 or newer
Description
After upgrading react-native from 0.73.8 to 0.74.7 using the React Native Upgrade Helper, and I am currently using react-native-reanimated version 3.6.0.
When I try to do pod install it fails with the following:
!] Invalid `Podfile` file:
[!] Invalid `RNReanimated.podspec` file: [Reanimated] Unsupported React Native version. Please use 75 or newer..
# from /node_modules/react-native-reanimated/RNReanimated.podspec:6
# -------------------------------------------
# $config = find_config()
> assert_minimal_react_native_version($config)
#
# -------------------------------------------
.
# from /app/ios/Podfile:23
# -------------------------------------------
#
> config = use_native_modules!
# use_react_native!(
# -------------------------------------------
CocoaPods Version: 1.15.2
Ruby Version: 2.7.5
For android when I try to build the app I get the following:
FAILURE: Build failed with an exception.
* Where:
Build file '/node_modules/react-native-reanimated/android/build.gradle' line: 387
* What went wrong:
Execution failed for task ':react-native-reanimated:assertMinimalReactNativeVersionTask'.
> [Reanimated] Unsupported React Native version. Please use 75. or newer.
* 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 34s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installApp -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where:
Build file '/node_modules/react-native-reanimated/android/build.gradle' line: 387 * What went wrong:
Execution failed for task ':react-native-reanimated:assertMinimalReactNativeVersionTask'.
> [Reanimated] Unsupported React Native version. Please use 75. or newer.
I even tried to upgrade react-native-reanimated from 3.6.0 to 3.9.0, but that didn't work either.
Steps to reproduce
For iOS
cd iospod install
For Android
react-native run android
Snack or a link to a repository
None
Reanimated version
3.6.0
React Native version
0.74.7
Platforms
iOS and Android
JavaScript runtime
None
Workflow
React Native
Architecture
None
Build type
No response
Device
No response
Host machine
macOS
Device model
No response
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Reanimated 3.6.0 is not compatible with RN 0.74.x. Please take a look at the compatibility table here and bump reanimated to the compatible version.
The minimum compatible version for both, the Old and the New Architecture is 3.9.0
these are your current versions:
Let me know if it helps. You can reopen the issue if you still encounter the problem after the upgrade.
@MatiPl01 I tried to upgrade react-native-reanimated from 3.6.0 to 3.9.0, but still got the same error.
So you tried to use reanimated 3.9.0 with RN 0.74.7, right?
Have you reinstalled node_modules? You can clean up the project with the git clean -Xdf command called from the root of the project, then install all dependencies again (yarn install or npm install), install pods and build the project.
I think that your dependencies might be in the invalid state after the upgrade or you might have done something wrong during the upgrade.
Yes I am trying to use 3.9.0 with RN 0.74.7 now. It's still not working.
- I deleted
node_modules,yarn.lock, andPodfile.lock - Then ran
yarn installagain - Then tried
pod installand it still failed with the same error - And tried to build android and still failed with the same error as before as well
Ok I think I upgraded to RN 0.74.7 incorrectly, so I downgraded to 0.74.0 and it's working now.
Actually I am getting a different error when I build the app
/node_modules/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:103: error: cannot find symbol super.replaceExistingNonRootView(oldTag, newTag); ^ symbol: method replaceExistingNonRootView(int,int)
/node_modules/react-native-reanimated/android/src/reactNativeVersionPatch/ReanimatedUIManager/latest/com/swmansion/reanimated/layoutReanimation/ReanimatedUIManager.java:116: error: cannot find symbol super.removeSubviewsFromContainerWithID(containerTag); ^ symbol: method removeSubviewsFromContainerWithID(int)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors FAILURE: Build failed with an exception. * What went wrong
hi @caralin3, there was another issue related to your error, and the way to fix it is to upgrade to Reanimated 3.10.0 or higher. Please let me know if it helps :)
That didn't work either. Now I am trying to upgrade to react-native 0.79.3 and am using react-native-reanimated 3.17.0, but I am getting this error when I try to run the android app:
> Configure project :react-native-reanimated
Android gradle plugin: 8.8.2
Gradle: 8.13
[Incubating] Problems report is available at: file:///Users/cara/Documents/BuckeyeBroadband/buckeyebb-mobile/android/build/reports/problems/problems-report.html
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.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
10 actionable tasks: 10 up-to-date
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.
* What went wrong:
Could not determine the dependencies of task ':app:processBuckeyeDebugResources'.
> Could not resolve all dependencies for configuration ':app:buckeyeDebugRuntimeClasspath'.
> Could not find com.android.support:appcompat-v7:31.0.0.
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://www.jitpack.io/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
Required by:
project :app > project :react-native-push-notification
> Could not find com.android.support:appcompat-v7:31.0.0.
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://www.jitpack.io/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
Required by:
project :app > project :react-native-splash-screen
> Could not find com.android.support:appcompat-v7:31.0.0.
Searched in the following locations:
- https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
- https://www.jitpack.io/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom
Required by:
project :app > project :react-native-video > com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b
* 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 1m 31s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installBuckeyeDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Could not determine the dependencies of task ':app:processBuckeyeDebugResources'.
> Could not resolve all dependencies for configuration ':app:buckeyeDebugRuntimeClasspath'. > Could not find com.android.support:appcompat-v7:31.0.0. Searched in the following locations: - https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://www.jitpack.io/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom Required by: project :app > project :react-native-push-notification > Could not find com.android.support:appcompat-v7:31.0.0. Searched in the following locations: - https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://www.jitpack.io/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom Required by: project :app > project :react-native-splash-screen > Could not find com.android.support:appcompat-v7:31.0.0. Searched in the following locations: - https://oss.sonatype.org/content/repositories/snapshots/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://repo.maven.apache.org/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://dl.google.com/dl/android/maven2/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom - https://www.jitpack.io/com/android/support/appcompat-v7/31.0.0/appcompat-v7-31.0.0.pom Required by: project :app > project :react-native-video > com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b * 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 1m 31s.
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Hi @caralin3, please refer to our Compatibility Table - Reanimated 3.17.0 does not support RN 0.79, please update Reanimated to minimum 3.17.4 (preferably to latest) and then let me know if it helped :)
Was able to build with reanimated version 3.16.7 and react-native 0.75.5
just go your previous branch and run the code, and then if you want to new brach, then create branch it will worked for you, thanks. Note: no need to update any version
[!] Invalid `Podfile` file:
[!] Invalid `RNReanimated.podspec` file: [Reanimated] Unsupported React Native version. Please use 78 or newer..
# from node_modules/react-native-reanimated/RNReanimated.podspec:6
# -------------------------------------------
# $config = find_config()
> assert_minimal_react_native_version($config)
#
# -------------------------------------------
.
# from /ios/Podfile:17
# -------------------------------------------
# target 'xxx' do
> config = use_native_modules!
#
# -------------------------------------------
RN : 0.76.9
"react-native-reanimated": "^3.18.0",
any solution for this getting error while running the command "pod install"
@devendra-dangi Please read the error message again. It already provides a solution:
[Reanimated] Unsupported React Native version. Please use 78 or newer.
@MatiPl01 but here it says we can use 3.18 version with 0.76.9 rn version
@devendra-dangi You must be using reanimated 3.19. I've just checked sources of the released 3.18.0 version and it has min supported version set to 0.75:
minimalReactNativeVersion = 75
if config[:react_native_minor_version] < minimalReactNativeVersion
raise "[Reanimated] Unsupported React Native version. Please use #{minimalReactNativeVersion} or newer."
end
Please look at your node_modules, search for the react-native-reanimated package and check which version it shows in the package.json (or validate it using yarn why if you use yarn package manager or using a different method for a different package manager)
@MatiPl01 yes you're correct when i check i got this
def assert_minimal_react_native_version(config) # If you change the minimal React Native version remember to update Compatibility Table in docs minimalReactNativeVersion = 78 if config[:react_native_minor_version] < minimalReactNativeVersion raise "[Reanimated] Unsupported React Native version. Please use #{minimalReactNativeVersion} or newer." end end
{ "name": "react-native-reanimated", "version": "3.19.1", "description": "More powerful alternative to Animated library for React Native.", "scripts": { "react-native": "0.80.0-rc.3",
it is using 3.19.1 version from /node_modules/react-native-reanimated/package.json
so which version should i install which is compatible for 0.76.9
3.18.0 should be compatible, so downgrade from 3.19.1 to 3.18.0 or upgrade React Native to 0.78.
@MatiPl01 Thanks a lot — the issue was solved by removing the ^ from the library version.
Changed "react-native-reanimated": "^3.18.0" to "react-native-reanimated": "3.18.0".
For me, after trying everything mentioned here didn't work I tried installing latest/compatible version of react-native-worklets and it resolved the issue
For me, after trying everything mentioned here didn't work I tried installing latest/compatible version of react-native-worklets and it resolved the issue
What version of react native are you using, I am on RN 0.76.3 and reanimated 3.18.0 but still get this error
[Reanimated] react-native-worklets package isn't installed. Please install a version between 0.4.0 and 0.4 to use Reanimated 4.1.0.
[Reanimated] Failed to validate worklets version
[!] Invalid `Podfile` file:
[!] Invalid `RNReanimated.podspec` file: [Reanimated] Failed to validate worklets version.
@Neon-jeff It is not possible that you are getting this missing react-native-worklets on Reanimated v3. Can you please validate your dependencies and check which version of reanimated is really installed? You can just go into your node_modules dir, look for react-native-reanimated, get into its sources and open the package.json file to see which version you have.
If it shows 4.x.x., then you likely have some issue with your dep version specified in the package.json file. You may try replacing it with an exact version "3.18.0".
@MatiPl01 I think apparently it was an nx issue, I haven't pinpointed the main issue yet, but I suspect having the ^ in the package.json file as ^3.18.0, removing my .nx folder, the caret symbol, node modules, yarn.lock , podfile.lock, re-installing packages and pods install fixed the issue. Thanks by the way.
Pod install took 205 [s] to run Integrating client project Pod installation complete! There are 114 dependencies from the Podfile and 143 total pods installed.
@MatiPl01 Thanks a lot — the issue was solved by removing the ^ from the library version.
Changed "react-native-reanimated": "^3.18.0" to "react-native-reanimated": "3.18.0".
Thank you, it worked for me!