0

Although this question has been asked by others, none of the provided solutions work for my use case.

Environment

System:
    OS: macOS 12.3.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 202.25 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.1.0 - ~/.nvm/versions/node/v16.1.0/bin/node
    Yarn: 1.22.19 - ~/.yarn/bin/yarn
    npm: 7.11.2 - ~/.nvm/versions/node/v16.1.0/bin/npm
    Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /opt/homebrew/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.15 - /Users/AH94896/.jenv/shims/javac (Using Java 1.8 gives same result)
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.14.0 => 16.14.0
    react-native: 0.64.1 => 0.64.1
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

------------------------------------------------------------
Gradle 6.5.1
------------------------------------------------------------

Build time:   2020-06-30 06:32:47 UTC
Revision:     66bc713f7169626a7f0134bf452abde51550ea0a

Kotlin:       1.3.72
Groovy:       2.5.11
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          11.0.15 (Eclipse Adoptium 11.0.15+10)
OS:           Mac OS X 12.3.1 x86_64

Description

I can clean the app using ./gradlew clean. But when launching using npx react-native run-android, the build fails in the same spot:

> Configure project :react-native-reanimated
No AAR for react-native-reanimated found. Attempting to build from source.
Native libs debug enabled: false
Android gradle plugin: 4.1.0
Gradle: 6.5.1
building Reanimated2

> Task :react-native-reanimated:compileDebugJavaWithJavac FAILED

The place in the build process where it goes awry is this

/Users/AH94896/projects/app/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java:13: error: cannot find symbol
      ViewManagerResolver viewManagerResolver,
      ^
  symbol:   class ViewManagerResolver
  location: class ReanimatedUIImplementation
/Users/AH94896/projects/app/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/ReanimatedUIImplementation.java:11: error: recursive constructor invocation
  public ReanimatedUIImplementation(
         ^
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:
Execution failed for task ':react-native-reanimated:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

The REALLY odd fact is that NO ONE else on my team experiences this problem whether using Apple M1 or Intel Macs. I have exhausted every resource I've found searching for a solution. Please ask if you need more info. This is a critical blocker for my project work.

Mike S.
  • 2,048
  • 1
  • 32
  • 55
  • Hi @mike have you found any solution for this? – Himanshu G Aug 23 '22 at 12:57
  • @HimanshuG There seems to be multiple issues with the reanimated library. Two things that may help 1. if you can, upgrade RN to 0.68 or higher. 2. Try a step-wise upgrade of the reanimated library itself. Our research indicates that the 2.2 version of the library will not work with 0.64. – Mike S. Aug 24 '22 at 18:39

0 Answers0