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

Build failure with v1.7.0 and RN 0.69.4

Open zarkoden opened this issue 2 years ago • 4 comments

Description

Android build fails with message:

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/zarkodencic/Documents/Coding/ReanimatedTest/node_modules/react-native-reanimated/android/build.gradle' line: 21

* What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.
> Plugin with id 'maven' not found.

Steps to reproduce

Run: npx react-native run-android

Snack or a link to a repository

https://github.com/zarcode/ReanimatedTest

Reanimated version

1.7.0

React Native version

0.69.4

Platforms

Android

JavaScript runtime

No response

Workflow

No response

Architecture

No response

Build type

No response

Device

No response

Device model

No response

Acknowledgements

Yes

zarkoden avatar Sep 22 '22 16:09 zarkoden

Hi, thanks for reporting the issue, it seems to be due to the maven plugin being removed in Gradle version 7.0 (https://docs.gradle.org/7.0/userguide/upgrading_version_6.html#removal_of_the_legacy_maven_plugin).

You can try one of the two things as a workaround, before we fix this on our end:

  • downgrade Gradle to a 6.x version
  • ~~change apply plugin: 'maven' to apply plugin: 'maven-publish' in the file that is mentioned in the error message~~ I think this might not actually work, but feel free to try it anyway

Kwasow avatar Sep 23 '22 10:09 Kwasow

@Kwasow, thanks for reply, I got:

* What went wrong:
Execution failed for task ':react-native-gradle-plugin:compileKotlin'.
> Compilation error. See log for more details

after I changed:

  1. build.gradle classpath("com.android.tools.build:gradle:4.2.2")
  2. android/gradle/wrapper/gradle-wrapper.properties distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
  3. android/gradle/wrapper/gradle-wrapper.jar

zarkoden avatar Sep 23 '22 11:09 zarkoden

Hi again, Reanimated v1 is in legacy support now, and we only fix major issues. We cannot guarantee that it works with new Gradle and React Native versions. We encourage you to use Reanimated v2, which is actively supported and includes all the features of v1.

Kwasow avatar Sep 23 '22 13:09 Kwasow

Didn't know that v2 supports old APIs. @Kwasow thank you very much.

zarcode avatar Oct 01 '22 19:10 zarcode

Closing the issue, since it is related to deprecated Reanimated v1

Latropos avatar Sep 13 '23 10:09 Latropos