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

No aar for react-native-reanimated found. #2650

Closed
1 task
rohitatcoffee opened this issue Nov 22, 2021 · 55 comments
Closed
1 task

No aar for react-native-reanimated found. #2650

rohitatcoffee opened this issue Nov 22, 2021 · 55 comments
Assignees
Labels
Bug Build or config issue This issue is likely related to the reporter's specific project config 🏠 Reanimated 2 Reproducible 🎉

Comments

@rohitatcoffee
Copy link

rohitatcoffee commented Nov 22, 2021

Description

No aar for react-native-reanimated found.

Expected behavior

Android build should work

Actual behavior & steps to reproduce

  1. add - React Native Reanimated: "^2.2.4" in project
  2. Then run the gradle build
  3. It's not getting compiled
Gradle log
Build file '/Users/rohit.deshmukh/Desktop/project/node_modules/react-native-reanimated/android/build.gradle' line: 93

A problem occurred evaluating project ':react-native-reanimated'.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating project ':react-native-reanimated'.
	at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
	at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
	at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136)
	at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
	at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
	at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:248)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:275)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:247)
	at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:42)
	at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
	at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:35)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:100)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:248)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:308)
	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:178)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:308)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:289)
	at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:247)
	at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63)
	at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:710)
	at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:145)
	at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:36)
	at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:64)
	at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:46)
	at org.gradle.configuration.BuildTreePreparingProjectsPreparer.prepareProjects(BuildTreePreparingProjectsPreparer.java:57)
	at org.gradle.configuration.BuildOperationFiringProjectsPreparer$ConfigureBuild.run(BuildOperationFiringProjectsPreparer.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
	at org.gradle.initialization.DefaultGradleLauncher.prepareProjects(DefaultGradleLauncher.java:228)
	at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:165)
	at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
	at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:126)
	at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:72)
	at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:67)
	at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:178)
	at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
	at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
	at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:60)
	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
	at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
	at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:63)
	at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
	at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:67)
	at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
	at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:54)
	at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:87)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:53)
	at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleBuildActionExecuter.java:33)
	at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:49)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:32)
	at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:27)
	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:104)
	at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:55)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:64)
	at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:37)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.lambda$execute$0(SessionScopeLifecycleBuildActionExecuter.java:54)
	at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:67)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:50)
	at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:36)
	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
	at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
	at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
	at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
	at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
	at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
	at org.gradle.util.Swapper.swap(Swapper.java:38)
	at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
	at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
	at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
	at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
	at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.api.GradleException: No aar for react-native-reanimated found.
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at build_bt9a0v67gu3ntxmxgjfr8k0he.run(/Users/rohit.deshmukh/Desktop/project/node_modules/react-native-reanimated/android/build.gradle:93)
	at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
	... 140 more

Package versions

  • react-native-cli: 2.0.1
  • react-native: 0.62.0
  • React Native Reanimated: "^2.2.4"
  • NodeJS: v16.2.0
  • Xcode: Version 13.0 (13A233)
  • Java & Gradle:openjdk version "1.8.0_282" and Gradle 5.6

Affected platforms

  • Android
@github-actions
Copy link

github-actions bot commented Nov 22, 2021

Issue validator

The issue is valid!

@rohitatcoffee
Copy link
Author

Also tried with "react-native-reanimated": "react-native-reanimated@2.3.0-alpha.2",
Still same error

@kkafar kkafar self-assigned this Nov 22, 2021
@kkafar
Copy link
Member

kkafar commented Nov 22, 2021

Hi!
At the first glance it looks like you are using too low react-native version. Try upgrading it at least to 0.63.x (lowest aar was build with 0.63.3).

Edit: you may also try downgrading version of react-native-reanimated: 2.2.2 should be enough

We are currently working on building from source on client side but it is not there yet.

@kkafar kkafar added Reproducible 🎉 Build or config issue This issue is likely related to the reporter's specific project config labels Nov 22, 2021
@piaskowyk piaskowyk linked a pull request Nov 23, 2021 that will close this issue
6 tasks
@dinukasal
Copy link

This issue goes away when react-native version is upgraded to 0.63.x as mentioned by @kkafar. Thanks!

@marcoXbresciani
Copy link

Seems to be still present with Expo framework 44.0.0, based on react-native 0.64.3 (react-native-reanimated 2.3.1): while trying to build my app for F-Droid, I saw the same error. See https://gitlab.com/marcoXbresciani/fdroiddata/-/jobs/1944767156 line 2438.

@TharinduKetipe
Copy link

kkafar

Hi I'm still getting this issue for v2.8.0. Any idea how to fix this?
#3231

@eggybot
Copy link

eggybot commented Jun 3, 2022

Still issue in RN 0.68.2

@loupmasneri
Copy link

loupmasneri commented Jun 9, 2022

Same issue using:
RN 0.68.1
react-native-reanimated 2.8.0

This version fix the issue:
"react-native-reanimated": "2.4.0"

@adityabishtedu
Copy link

adityabishtedu commented Jun 19, 2022

Check Yarn.lock , make sure the version installed in package.json is the same as in yarn.lock ,It fixed it for me. my version was "react-native-reanimated": "^2.4.1", but in yarn.lock it was :"2.8.0" downgrading it solves it
image

My react native version is : 0.63.4

@Dakuan
Copy link

Dakuan commented Aug 6, 2022

now failing expo/eas builds

@roots-ai
Copy link

Issue with react-native 0.70.1

@mharrison-nzme
Copy link

Experiencing this issue on react-native 0.63.3

@garrettg123
Copy link

Experiencing this with expo-dev-client:

A problem occurred evaluating project ':expo-dev-menu'.
> No matching aar for react-native-reanimated found. Upgrade react-native to 0.63.x or later in order to use the expo-dev-menu package.

Versions:

"expo": "^44.0.0",
"expo-dev-client": "^1.3.1",
"react-native-reanimated": "2.4.0", (also tried 2.8.0)

@viniciusoliveira01
Copy link

viniciusoliveira01 commented Oct 31, 2022

Experiencing this with expo-dev-client:

A problem occurred evaluating project ':expo-dev-menu'.
> No matching aar for react-native-reanimated found. Upgrade react-native to 0.63.x or later in order to use the expo-dev-menu package.

Versions:

"expo": "^44.0.0",
"expo-dev-client": "^1.3.1",
"react-native-reanimated": "2.4.0", (also tried 2.8.0)

I'm experiencing the same thing when building with EAS

@angelothegreat13
Copy link

Experiencing this issue on react-native 0.65.3

@Jonathan3209
Copy link

Same issue with react-native 0.70.5

@Jonathan3209
Copy link

Same issue with react-native 0.70.5

Running cd android/app/.cxx && rm -rf debug worked for me.

I'm with RN@0.70.5 and react-native-reanimated@2.12.0.

I guess it's probably cleaning the cmake cache.

@anis-18
Copy link

anis-18 commented Dec 6, 2022

Check Yarn.lock , make sure the version installed in package.json is the same as in yarn.lock ,It fixed it for me. my version was "react-native-reanimated": "^2.4.1", but in yarn.lock it was :"2.8.0" downgrading it solves it image

My react native version is : 0.63.4

Did you find a solution ?

@kkafar
Copy link
Member

kkafar commented Dec 6, 2022

I'm no longer on reanimated team, but if I recall correctly each version of react-native-reanimated v2 comes with prebuilded aars for only few last versions of react-native. In case you use react-native version for which there is no prebuild aar distributed you will get this error, but the library should try to build itself from sources since version 2.5.0.

Please, note also that versions 2.8.x, 2.9.x had some other misconfigurations which where fixed in 2.10.0.

To resolve the issue you should try

  1. using recent reanimated versions
  2. clean your app build cache (rm -fr android/build android/app/build android/app/.cxx)
  3. reinstall node_modules (rm -fr node_modules yarn.lock && yarn install)

@n0biTeam
Copy link

n0biTeam commented Feb 1, 2023

Comment this comment and after the case, how the file exists:
if (aar.exists()) {
println "AAR for react-native-reanimated has been found\n$aar" <--- //
return aar
} else {
....
}

@firstpersoncode
Copy link

I'm no longer on reanimated team, but if I recall correctly each version of react-native-reanimated v2 comes with prebuilded aars for only few last versions of react-native. In case you use react-native version for which there is no prebuild aar distributed you will get this error, but the library should try to build itself from sources since version 2.5.0.

Please, note also that versions 2.8.x, 2.9.x had some other misconfigurations which where fixed in 2.10.0.

To resolve the issue you should try

  1. using recent reanimated versions
  2. clean your app build cache (rm -fr android/build android/app/build android/app/.cxx)
  3. reinstall node_modules (rm -fr node_modules yarn.lock && yarn install)

I have tried with react-native 0.71.3 and latest react-native-reanimated 3.0.1, yet still receive this warning, and now it just stuck on configuring at 63%

WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 
8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true 
in the `gradle.properties` file or use the new publishing DSL.
[CXX1101] NDK at C:\Users\LENOVO\AppData\Local\Android\Sdk\ndk\23.1.7779620 did not have a source.properties file
Checking the license for package NDK (Side by side) 23.1.7779620 in C:\Users\LENOVO\AppData\Local\Android\Sdk\licenses
License for package NDK (Side by side) 23.1.7779620 accepted.
Preparing "Install NDK (Side by side) 23.1.7779620 (revision: 23.1.7779620)".
<========-----> 63% CONFIGURING [23m 42s]
> :react-native-reanimated
 

@bibekgurunguh
Copy link

For me, this fixed it:
newArchEnabled=true in gradle.properties

"react-native": "0.71.3",
"react-native-reanimated": "^3.0.0",

@ganholete
Copy link

Downgrade to 2.2.2 solved for me

@piaskowyk
Copy link
Member

In Reanimated 3, we no longer provide binaries in the npm package. You need to install NDK then Reanimated will build from the source.

@PpYCha
Copy link

PpYCha commented Apr 21, 2023

same issue, im using
"react-native": "0.71.7",
"react-native-reanimated": "^3.1.0",

@DoddyMatabaro
Copy link

i have same error, using

"react-native": "0.71.7",
"react-native-reanimated": "^3.1.0"

@oferra
Copy link

oferra commented Apr 23, 2023

the following did help me:

Open Android Studio
Click “Open an Existing Project”
Choose the “android” folder in your project folder
Press “Open”

That’s it! It took a couple minutes for Android Studio to finish opening the project for the first time, but the local.properties file was created pretty quickly. Thanks for reading my article, and hopefully it saved you some time!

src&credits:
https://medium.com/nerd-for-tech/react-native-sdk-location-not-found-2688c3440aeb

@joshsambrook
Copy link

I am also getting this issue and struggling to find a fix. Any clues?

@agdeasis
Copy link

agdeasis commented May 4, 2023

i have same issue on android only, using

"react-native": "0.71.7",
"react-native-reanimated": "^3.1.0"

@belkhoujaons
Copy link

belkhoujaons commented May 8, 2023

it worked for me when I downgraded "react-native-reanimated" to "2.2.4"
I'm using "react-native" version "0.71.7"

@viter-sweatcon
Copy link

viter-sweatcon commented May 22, 2023

@piaskowyk

In Reanimated 3, we no longer provide binaries in the npm package

Why ? or how did you provide them in new way ?

@pankajmandal10
Copy link

Configure project :react-native-reanimated
No AAR for react-native-reanimated found. Attempting to build from source.
Android gradle plugin: 7.3.1
Gradle: 7.5.1

@tkud04
Copy link

tkud04 commented Jun 9, 2023

@piaskowyk

In Reanimated 3, we no longer provide binaries in the npm package

Why ? or how did you provide them in new way ?

Co-ask please?

@jessedoescode
Copy link

Hey guys,

Pinging here about Reanimated 3 and the AAR. My understanding is that as long as NDK is installed with Android Studio, Reanimated 3 should work for Android with npm install react-native-reanimated and no further setup.

However, I have NDK version 23.1.7779620 installed (verified from Project Structure/Modules) and am still getting the error:

> Configure project :react-native-reanimated
Evaluating project ':react-native-reanimated' using build file '/.../node_modules/react-native-reanimated/android/build.gradle'.
No AAR for react-native-reanimated found. Attempting to build from source.
Android gradle plugin: 7.3.1
Gradle: 7.5.1
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

Is there a step I'm missing for building Reanimated 3? I have no problem if I downgrade to 2, but would prefer 3. Thanks!

@piaskowyk
Copy link
Member

When it comes to:

In Reanimated 3, we no longer provide binaries in the npm package
Why ? or how did you provide them in new way ?

To avoid weird crashes while using the app, we need to have different versions of the binaries for different configurations. This includes the last 3 versions of React Native, all the patch versions for each of those versions (which averages to about 5 patches per version), 2 different runtime types (Herems and JSC), and the last 3 NDK versions.

We end up with 90 different versions of the app (3 x 5 x 2 x 3 = 90). Each of these versions is about 4MB in size, which adds up to 360MB in total - which is over the NPM package size limit.

To solve this problem, we've decided not to include all 90 versions in the package anymore. Instead, we'll build the necessary Reanimated binaries from the source while the user builds the app on their machine.

@znahas
Copy link

znahas commented Jul 10, 2023

Configure project :react-native-reanimated
No AAR for react-native-reanimated found. Attempting to build from source.
Android gradle plugin: 7.3.1
Gradle: 7.5.1

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':react-native-reanimated'.

java.lang.NullPointerException

@znahas
Copy link

znahas commented Jul 10, 2023

Please help, I am not able to build :react-native-reanimated after upgrading to ubuntu 23.

@VivekCEpic
Copy link

For me, this fixed it: newArchEnabled=true in gradle.properties

"react-native": "0.71.3", "react-native-reanimated": "^3.0.0",

Still not working.

When i need to add newArchEnabled=true that time multiple error coming.

@markendy
Copy link

After update to RN 72.3 and update "react-native-reanimated": "^3.0.2"
I have this problem
I need help : (
Android build very slow, 15+ minutes
I run: "yarn start" and click "a" key

@owens-ben
Copy link

Having this issue in react-native 0.72.3 "react-native-reanimated": "3.3.0"

@mrshahzeb7
Copy link

any solution ?

facing on
"react": "^18.2.0",
"react-native": "^0.72.4",

@agoryuno
Copy link

agoryuno commented Aug 20, 2023

"react-native": "0.72.4"
"react": "18.2.0"
"react-native-reanimated": "^3.4.2"

So is there any way at all to use Reanimated?

P.S. To follow up, for me this turned out to be a weird Ubuntu problem with cmake: I had a Python script wrapping cmake in ~/.local which was throwing an error due to being unable to find cmake-python. I had to create a venv in my React-Native project, install cmake-python into that and now rebuild the project from inside an activated venv.

@AlaminPu1007
Copy link

AlaminPu1007 commented Aug 22, 2023

"react-native": "0.72.4" "react": "18.2.0" "react-native-reanimated": "^3.4.2"

So is there any way at all to use Reanimated?

I have recently cloned my repository from GitHub, and I had also encountered the same issue. The functionality was working perfectly before I cloned the project.

Here are the relevant dependencies from my project's configuration:

  • "react-native": "0.72.4"
  • "react": "18.2.0"
  • "react-native-reanimated": "^3.4.2"

To resolve this issue, I followed these steps:

  • Uninstalled react-native-reanimated.
  • Deleted the "node_modules" directory from my project.
  • Reinstalled react-native-reanimated by following the steps outlined in the official documentation.
  • Installed all available versions of cMake from the "SDK_TOOLS" section in Android Studio.
  • in "android/gradle.properties" -> make "newArchEnabled" true to false.(ex:newArchEnabled=false)

By following these steps, I was able to successfully overcome the problem and restore the functionality of my project.

@goddypete57
Copy link

i have this warning below when runing on android

WARNING reanimated - no version-specific reanimated AAR for react-native version 72 found.
Falling back to AAR for react-native version 71.
The react-native JSI interface is not ABI-safe yet, this may result in crashes.
Please post a pull request to implement support for react-native version 72 to the reanimated repo.
Thanks!
and it crashes on ios when navigating to another screen without error but navigation is working perfectly on android ,pls i need help

@Abdullah-Sajjad026
Copy link

I am a React developer and was about to work on a React Native project. I faced many issues during my project setup. Most of them were wrong PATH settings and less permissions issues.
In my case, the reason of this error was that my ndk path was not being put correctly when building so the gradle considered that NDK was not installed. I also reinstalled NDK but then I found that the issue is path being wrong.

So, I found a solution to create a local.properties file in android folder root and put ndk.dir = NDK_PATH_HERE where my ndk path was like /Users/USERNAME/Library/Android/sdk/ndk/25.2.9519653.

Also I faced an issue while installing NDK from Android Studio SDK Manager and that was of no permissions being granted to Android Studio although other Tools were successfully installed without any such issue.
This question Stack Overflow and specifically this command sudo chown -R $USER: $ANDROID_HOME helped me solve it.

@goddypete57
Copy link

goddypete57 commented Sep 6, 2023 via email

@gavrilikhin-d
Copy link

gavrilikhin-d commented Oct 13, 2023

I'm no longer on reanimated team, but if I recall correctly each version of react-native-reanimated v2 comes with prebuilded aars for only few last versions of react-native. In case you use react-native version for which there is no prebuild aar distributed you will get this error, but the library should try to build itself from sources since version 2.5.0.
Please, note also that versions 2.8.x, 2.9.x had some other misconfigurations which where fixed in 2.10.0.
To resolve the issue you should try

  1. using recent reanimated versions
  2. clean your app build cache (rm -fr android/build android/app/build android/app/.cxx)
  3. reinstall node_modules (rm -fr node_modules yarn.lock && yarn install)

I have tried with react-native 0.71.3 and latest react-native-reanimated 3.0.1, yet still receive this warning, and now it just stuck on configuring at 63%

WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 
8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true 
in the `gradle.properties` file or use the new publishing DSL.
[CXX1101] NDK at C:\Users\LENOVO\AppData\Local\Android\Sdk\ndk\23.1.7779620 did not have a source.properties file
Checking the license for package NDK (Side by side) 23.1.7779620 in C:\Users\LENOVO\AppData\Local\Android\Sdk\licenses
License for package NDK (Side by side) 23.1.7779620 accepted.
Preparing "Install NDK (Side by side) 23.1.7779620 (revision: 23.1.7779620)".
<========-----> 63% CONFIGURING [23m 42s]
> :react-native-reanimated
 

For me this was caused by an empty ndk/23.1.7779620 folder. Fixed by:

sdkmanager --install "ndk;23.1.7779620"

I also needed to install cmake:

sdkmanager --install "cmake;3.22.1"

@gerardo-contijoch
Copy link

I'm no longer on reanimated team, but if I recall correctly each version of react-native-reanimated v2 comes with prebuilded aars for only few last versions of react-native. In case you use react-native version for which there is no prebuild aar distributed you will get this error, but the library should try to build itself from sources since version 2.5.0.

Please, note also that versions 2.8.x, 2.9.x had some other misconfigurations which where fixed in 2.10.0.

To resolve the issue you should try

  1. using recent reanimated versions
  2. clean your app build cache (rm -fr android/build android/app/build android/app/.cxx)
  3. reinstall node_modules (rm -fr node_modules yarn.lock && yarn install)

I confirm that this solution works.

@Mehdise04
Copy link

I'm no longer on reanimated team, but if I recall correctly each version of react-native-reanimated v2 comes with prebuilded aars for only few last versions of react-native. In case you use react-native version for which there is no prebuild aar distributed you will get this error, but the library should try to build itself from sources since version 2.5.0.

Please, note also that versions 2.8.x, 2.9.x had some other misconfigurations which where fixed in 2.10.0.

To resolve the issue you should try

  1. using recent reanimated versions
  2. clean your app build cache (rm -fr android/build android/app/build android/app/.cxx)
  3. reinstall node_modules (rm -fr node_modules yarn.lock && yarn install)

thanks mate, this solution works.

@shivarajpu
Copy link

I'm no longer on reanimated team, but if I recall correctly each version of react-native-reanimated v2 comes with prebuilded aars for only few last versions of react-native. In case you use react-native version for which there is no prebuild aar distributed you will get this error, but the library should try to build itself from sources since version 2.5.0.
Please, note also that versions 2.8.x, 2.9.x had some other misconfigurations which where fixed in 2.10.0.
To resolve the issue you should try

  1. using recent reanimated versions
  2. clean your app build cache (rm -fr android/build android/app/build android/app/.cxx)
  3. reinstall node_modules (rm -fr node_modules yarn.lock && yarn install)

thanks mate, this solution works.

"react-native": "0.72.4" "react": "18.2.0" "react-native-reanimated": "^3.4.2"
So is there any way at all to use Reanimated?

I have recently cloned my repository from GitHub, and I had also encountered the same issue. The functionality was working perfectly before I cloned the project.

Here are the relevant dependencies from my project's configuration:

  • "react-native": "0.72.4"
  • "react": "18.2.0"
  • "react-native-reanimated": "^3.4.2"

To resolve this issue, I followed these steps:

  • Uninstalled react-native-reanimated.
  • Deleted the "node_modules" directory from my project.
  • Reinstalled react-native-reanimated by following the steps outlined in the official documentation.
  • Installed all available versions of cMake from the "SDK_TOOLS" section in Android Studio.
  • in "android/gradle.properties" -> make "newArchEnabled" true to false.(ex:newArchEnabled=false)

By following these steps, I was able to successfully overcome the problem and restore the functionality of my project.

Anu suggestion for "react": "18.2.0",
"react-native": "0.74.3",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build or config issue This issue is likely related to the reporter's specific project config 🏠 Reanimated 2 Reproducible 🎉
Projects
None yet
Development

Successfully merging a pull request may close this issue.