* 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
我也试过这个 stackoverflow 解决方案 →
https://stackoverflow.com/a/70294898/12071002
但是链接可能在较新的版本中被删除了
也尝试使用 Android Studio 构建项目,但
compileSdkVersion
的问题与图像中一样或与 npx react-native run-android
运行相同
或者我不认为这些与这个问题有关
不确定我是否可以提供帮助,但是当我升级
react-native-gesture-handler
时我遇到了gradle to 7.4.1
的问题。
它在 npm upgrade
后自行修复。
另一件事是升级 android studio。
你用的是哪个 react-native?