Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt

Viewed 401

I run a react native project on visual studio code and use genymotion. I got these errors :

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • Where: Build file 'C:\Users\trann\Desktop\Mobile Apps\Sitter\Sitter\node_modules\react-native-webview\android\build.gradle' line: 26

  • What went wrong: A problem occurred evaluating project ':react-native-webview'.

Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt

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-webview'.

compileSdkVersion is not specified.

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 32s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • Where: Build file 'C:\Users\trann\Desktop\Mobile Apps\Sitter\Sitter\node_modules\react-native-webview\android\build.gradle' line: 26

  • What went wrong: A problem occurred evaluating project ':react-native-webview'.

Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt

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-webview'.

compileSdkVersion is not specified.

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 32s

at checkExecSyncError (child_process.js:630:11)
at execFileSync (child_process.js:648:15)
at runOnAllDevices (C:\Users\trann\Desktop\Mobile Apps\Sitter\Sitter\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
at buildAndRun (C:\Users\trann\Desktop\Mobile Apps\Sitter\Sitter\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\trann\Desktop\Mobile Apps\Sitter\Sitter\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Command.handleAction (C:\Users\trann\Desktop\Mobile Apps\Sitter\Sitter\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:164:9)
0 Answers
Related