1
* What went wrong:
A problem occurred evaluating project ':react-native-gesture-handler'.
> Could not initialize class org.jetbrains.kotlin.gradle.plugin.KotlinGradleBuildServices

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-gesture-handler'.
> compileSdkVersion is not specified. Please add it to build.gradle

I tried this stackoverflow solution also → https://stackoverflow.com/a/70294898/12071002

But the link is removed maybe in newer version

enter image description here

Tried to build project with Android Studio also but the issue with compileSdkVersion as in the image or same with running with npx react-native run-android

enter image description here

or i didn't think these are related to this issue

enter image description here

Imbharat420
  • 206
  • 2
  • 11

1 Answers1

0

Unsure if I can help, but I got issue with react-native-gesture-handler when I upgraded the gradle to 7.4.1. it fixed it self after a npm upgrade. An other thing to try is to upgrade android studio.

Wich react-native are you using?

KLK
  • 49
  • 7
  • sorry i forget to mention this on question but i am using Gradle = gradle-7.5.1, JDK = Microsoft\jdk-11.0.18.10 (openjdk as installtion in docs), "react-native": "0.71.3", (latest as from npx react-native) – Imbharat420 Feb 22 '23 at 08:37
  • and i am using the latest Android studio maybe because i update it just 2 days ago when i get notify from android studio – Imbharat420 Feb 22 '23 at 08:45
  • Wich verion of react-native-gesture-handler are you using? Tried to uninstall it and install it again? – KLK Feb 22 '23 at 13:37
  • "react-native-gesture-handler": "^2.9.0", – Imbharat420 Feb 22 '23 at 18:23