react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

Invalid RNReanimated.podspec file: [Reanimated] Unsupported React Native version. Please use 0.75 or newer

Open caralin3 opened this issue 7 months ago • 11 comments

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

  1. cd ios
  2. pod install

For Android

  1. 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

caralin3 avatar May 09 '25 13:05 caralin3

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?

github-actions[bot] avatar May 09 '25 13:05 github-actions[bot]

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:

Image

MatiPl01 avatar May 09 '25 13:05 MatiPl01

Let me know if it helps. You can reopen the issue if you still encounter the problem after the upgrade.

MatiPl01 avatar May 09 '25 14:05 MatiPl01

@MatiPl01 I tried to upgrade react-native-reanimated from 3.6.0 to 3.9.0, but still got the same error.

caralin3 avatar May 09 '25 14:05 caralin3

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.

MatiPl01 avatar May 09 '25 14:05 MatiPl01

Yes I am trying to use 3.9.0 with RN 0.74.7 now. It's still not working.

  1. I deleted node_modules, yarn.lock, and Podfile.lock
  2. Then ran yarn install again
  3. Then tried pod install and it still failed with the same error
  4. And tried to build android and still failed with the same error as before as well

caralin3 avatar May 09 '25 14:05 caralin3

Ok I think I upgraded to RN 0.74.7 incorrectly, so I downgraded to 0.74.0 and it's working now.

caralin3 avatar May 09 '25 15:05 caralin3

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

caralin3 avatar May 09 '25 15:05 caralin3

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 :)

patrycjakalinska avatar May 21 '25 07:05 patrycjakalinska

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.

caralin3 avatar Jun 12 '25 20:06 caralin3

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 :)

patrycjakalinska avatar Jun 18 '25 06:06 patrycjakalinska

Was able to build with reanimated version 3.16.7 and react-native 0.75.5

caralin3 avatar Jul 24 '25 22:07 caralin3

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

zahid502 avatar Aug 04 '25 14:08 zahid502

[!] 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 avatar Aug 08 '25 09:08 devendra-dangi

@devendra-dangi Please read the error message again. It already provides a solution:

[Reanimated] Unsupported React Native version. Please use 78 or newer.

MatiPl01 avatar Aug 08 '25 09:08 MatiPl01

@MatiPl01 but here it says we can use 3.18 version with 0.76.9 rn version

devendra-dangi avatar Aug 08 '25 09:08 devendra-dangi

@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 avatar Aug 08 '25 10:08 MatiPl01

@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

devendra-dangi avatar Aug 08 '25 10:08 devendra-dangi

3.18.0 should be compatible, so downgrade from 3.19.1 to 3.18.0 or upgrade React Native to 0.78.

MatiPl01 avatar Aug 08 '25 10:08 MatiPl01

@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".

devendra-dangi avatar Aug 08 '25 10:08 devendra-dangi

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

C0C41N avatar Sep 15 '25 12:09 C0C41N

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 avatar Sep 22 '25 08:09 Neon-jeff

@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 avatar Sep 22 '25 10:09 MatiPl01

@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.

Neon-jeff avatar Sep 23 '25 04:09 Neon-jeff

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!

MalekZishan avatar Oct 07 '25 06:10 MalekZishan