react-native-reanimated
react-native-reanimated copied to clipboard
Build failure with v1.7.0 and RN 0.69.4
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
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'
toapply 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, 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:
- build.gradle
classpath("com.android.tools.build:gradle:4.2.2")
- android/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip
- android/gradle/wrapper/gradle-wrapper.jar
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.
Didn't know that v2 supports old APIs. @Kwasow thank you very much.
Closing the issue, since it is related to deprecated Reanimated v1