FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':react-native-gesture-handler:compileDebugKotlin'.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details
* 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.
[
- Get more help at https://help.gradle.org]https://help.gradle.org)
BUILD FAILED in 3m 54s
at makeError (C:\Users\Zsola\Desktop\NoruHotels\node_modules\execa\index.js:174:9)
at C:\Users\Zsola\Desktop\NoruHotels\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\Zsola\Desktop\NoruHotels\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\Zsola\Desktop\NoruHotels\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
i tried this with ai
This error occurs when there is an issue with the Kotlin compilation process for the react-native-gesture-handler library. Here are some steps you can take to resolve the issue:
Make sure that you have the correct version of Kotlin Gradle Plugin installed. You can check the version in your project's build.gradle file under dependencies.
Try cleaning and rebuilding your project by running the following commands in your project directory:
cd android
./gradlew clean
cd ..
react-native run-android
- If the issue persists, try updating your Kotlin version by adding the following line to your project's build.gradle file:
ext.kotlin_version = '1.5.21'
Then update the Kotlin Gradle Plugin version to match:
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
- If none of the above steps work, try disabling Kotlin compilation for the react-native-gesture-handler library by adding the following line to your project's build.gradle file:
configurations.all {
exclude group: 'com.facebook.react', module: 'react-native-gesture-handler'
}
Then run react-native run-android again.
Hopefully one of these steps will resolve the issue for you.