FAILURE: Build failed with an exception.
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.
[
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
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"
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.
I solved it by upgrading my react-native-gesture-handler to version 2.9.0.
Update package.json:
Open your project's package.json file and find the dependency for react-native-gesture-handler. Change the version number to "2.9.0" (don't forget to remove ^). It should look like this:
"dependencies": {
"react-native-gesture-handler": "2.9.0",
// other dependencies...
}
Uninstall the node_modules folder.
Run npm install
Try building your project now
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With