Когда я запускаю свой нативный проект React, он дает вышеуказанную ошибку
здесь я поделился подробным описанием ошибки < /p>
> Task :react-native-gesture-handler:compileDebugKotlin FAILED
e: file:///Users/apple/Documents/Dhvani/ReactNative/protech_dna_user_app/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt:41:1 Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'RNGestureHandlerButtonViewManager'. Check your module classpath for missing or conflicting dependencies.
e: file:///Users/apple/Documents/Dhvani/ReactNative/protech_dna_user_app/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt:47:5 Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'RNGestureHandlerButtonViewManager'. Check your module classpath for missing or conflicting dependencies.
e: file:///Users/apple/Documents/Dhvani/ReactNative/protech_dna_user_app/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt:141:71 Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'RNGestureHandlerButtonViewManager'. Check your module classpath for missing or conflicting dependencies.
e: file:///Users/apple/Documents/Dhvani/ReactNative/protech_dna_user_app/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt:16:1 Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'RNGestureHandlerRootViewManager'. Check your module classpath for missing or conflicting dependencies.
e: file:///Users/apple/Documents/Dhvani/ReactNative/protech_dna_user_app/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt:22:5 Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'RNGestureHandlerRootViewManager'. Check your module classpath for missing or conflicting dependencies.
e: file:///Users/apple/Documents/Dhvani/ReactNative/protech_dna_user_app/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt:25:79 Cannot access 'ViewManagerWithGeneratedInterface' which is a supertype of 'RNGestureHandlerRootViewManager'. Check your module classpath for missing or conflicting dependencies.
[Incubating] Problems report is available at: file:///Users/apple/Documents/Dhvani/ReactNative/protech_dna_user_app/android/build/reports/problems/problems-report.html
Здесь я поделился версиями сведений о своем проекте
"react": "18.3.1",
"react-native": "0.75.4",
"react-native-gesture-handler": "^2.27.1",
Этот код Android> Build.gradle File Code
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 23
compileSdkVersion = 35
targetSdkVersion = 35
ndkVersion = "26.1.10909125"
kotlinVersion = "1.9.25"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.4")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
}
}
apply plugin: "com.facebook.react.rootproject"
Этот код файла является Android> App> Custle.gradle File Code
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
react {
autolinkLibrariesWithApp()
}
def enableProguardInReleaseBuilds = false
def jscFlavor = 'org.webkit:android-jsc:+'
android {
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion rootProject.ext.compileSdkVersion
namespace "com.protechdnauser"
defaultConfig {
applicationId "com.protechdnauser"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation "androidx.core:core-splashscreen:1.0.0-beta01"
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
Этот код gradle-wrapper.properties файловой код
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Подробнее здесь: https://stackoverflow.com/questions/796 ... n-compilat
Вызвано: org.jetbrains.kotlin.gradle.tasks.compilationErrorexception: ошибка компиляции. Смотрите журнал для более подро ⇐ Android
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение