software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
9.03k stars 1.31k forks source link

Can not run Example on Android: A problem occurred evaluating project ':react-native-reanimated' on Windows 11 #4563

Open huy-lv opened 1 year ago

huy-lv commented 1 year ago

Description

I run example on main branch (Windows 11), it shows error in command line:

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\code\rn\react-native-reanimated\Example\node_modules\react-native-reanimated\android\build.gradle' line: 173

* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> D:\code\rn\react-native-reanimated\Example\node_modules\react-native-reanimated\D:\code\rn\react-native-reanimated\Example\android\app\node_modules\react-native\ReactAndroid\gradle.properties (The filename, directory name, or volume label syntax is incorrect)

In the build.gradle line 173:

file("$reactNativeRootDir/ReactAndroid/gradle.properties").withInputStream { reactProperties.load(it) }

Steps to reproduce

  1. cd react-native-reanimated
  2. yarn (it shows error rm not found on Windows, so I changed rm to del)
  3. cd Example
  4. yarn
  5. yarn android

Snack or a link to a repository

https://github.com/software-mansion/react-native-reanimated/tree/main/Example

Reanimated version

main branch

React Native version

0.72.0-rc.5

Platforms

Android

JavaScript runtime

None

Workflow

React Native (without Expo)

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

github-actions[bot] commented 1 year ago

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?

huy-lv commented 1 year ago

It's here: https://github.com/software-mansion/react-native-reanimated/tree/main/Example

huy-lv commented 1 year ago

I fixed temporary by changing file: D:\code\rn\react-native-reanimated\Example\node_modules\react-native-reanimated\android\build.gradle, line 170:

def reactNativeRootDir = resolveReactNativeDirectory()

to

def reactNativeRootDir = file("D:\\code\\rn\\react-native-reanimated\\node_modules\\react-native")