I upgraded my React Native project to Gradle 7.0.2 and now when I open Android Studio it says No variants found for ':react-native-reanimated'
. I'm using react-native-reanimated@1.13.3
, and from the documentation for versions 1.x.x there's no real configuration, so I'm not sure how to approach this.
Has anyone run into anything similar? I'm using react-native@0.63.4
, gradle 7.0.2, and Android Gradle Plugin 7.0.0.
Asked
Active
Viewed 2,694 times
0

gkeenley
- 6,088
- 8
- 54
- 129
-
1I faced the same situation, mentioned here: https://stackoverflow.com/questions/70726037/react-native-reanimated-compilesdkversion-is-not-specified/70862139#70862139 – ridvanaltun Jan 27 '22 at 06:25
-
@ridvanaltun Is changing the `distributionUrl` line all you had to do in order to downgrade the gradle version? – gkeenley Jan 27 '22 at 06:44
-
@ridvanaltun When I make that change, it throws the error `Failed to apply plugin 'com.android.internal.version-check'. Minimum supported Gradle version is 7.0.2. Current version is 6.8.1` – gkeenley Jan 27 '22 at 06:47
-
If you build your project with `react-native run-android` command, yes, replacing Gradle version in gradle-wapper.properties file works. I don't know why Android Studio can't handle this – ridvanaltun Jan 27 '22 at 07:05
-
@ridvanaltun Which version of Android Studio are you using? I have the one from Jan 2021, and it seems like I can't use the older version of Gradle with it. I might downgrade my Android Studio. – gkeenley Jan 27 '22 at 18:21
-
1@ridvanaltun I got it to work using your advice, plus some other Android Studio downgrading. Feel free to post your answer as an actual response so I can accept. – gkeenley Jan 28 '22 at 04:17
-
i got same error in react native reanimated v2 – Khurshid Ansari Aug 03 '23 at 12:31
1 Answers
1
You need to downgrade your Gradle version 7 to 6 because somehow Gradle 7 not work with react-native-reanimated 1.13.3. You can downgrade the version from gradle-wrapper.properties
file like below:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip

ridvanaltun
- 2,595
- 2
- 15
- 28
-
Confirming that this worked. In my case, I have to downgrade my entire Android Studio, because the version (2021.1) of Android Studio that I was running didn't support Gradle 6.8 – gkeenley Jan 28 '22 at 20:37