RocketChat / Rocket.Chat.ReactNative

Rocket.Chat mobile clients
https://rocket.chat
MIT License
2.01k stars 1.17k forks source link

Android build fails: Failed to transform react-native-reanimated-68-hermes.aar to match attributes {artifactType=android-aar-metadata}. #4999

Open floels opened 1 year ago

floels commented 1 year ago

Description:

When following the mobile app environment setup instructions with the React Native 0.68 development environment set up, I get the following error when running yarn android for the first time:

Error: Command failed: ./gradlew app:installExperimentalPlayDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:checkExperimentalPlayDebugAarMetadata'.
> Could not resolve all files for configuration ':app:experimentalPlayDebugRuntimeClasspath'.
   > Failed to transform react-native-reanimated-68-hermes.aar (project :react-native-reanimated) to match attributes {artifactType=android-aar-metadata}.
      > Execution failed for JetifyTransform: /Users/florian/Documents/Privé/Code/rocket-chat-mobile/node_modules/react-native-reanimated/android/react-native-reanimated-68-hermes.aar.
         > Check failed.

Environment Information:

Steps to reproduce:

Follow the instructions of the developer doc to set up the Android development environment.

Expected behavior:

Android app starts running on emulated device.

Actual behavior:

Error when running yarn android (see detail above).

Additional context:

The same problem is reported in this issue in the react-native-reanimated repo. The recommended solution is to upgrade react-native-reanimated. I saw in this issue that we recently chose to ignore the upgrade to 3.0.1, I am not sure why.

floels commented 1 year ago

cc @diegolmello FYI

dnlsilva commented 1 year ago

I will try to reproduce

dnlsilva commented 1 year ago

I ran the project from scratch here and both locally and in the CI that makes the clone from scratch worked perfectly, it could be some blockage to that url or something like that in your environment.

About the update it was ignored because there is another PR that deals with it.

floels commented 1 year ago

Ok, thanks for checking @GleidsonDaniel 🙏