无法初始化类org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt

时间:2020-09-17 07:51:02

标签: react-native kotlin gradle

我在Visual Studio代码上运行一个react native项目并使用genymotion。 我遇到了这些错误:

失败:构建完成,有2次失败。

1:任务失败,出现异常。

  • 其中: 构建文件'C:\ Users \ trann \ Desktop \ Mobile Apps \ Sitter \ Sitter \ node_modules \ react-native-webview \ android \ build.gradle'行:26

  • 出了什么问题: 评估项目':react-native-webview'时发生问题。

无法初始化org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt类

尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。与--scan一起运行以获得完整的见解。

2:任务失败,出现异常。

  • 出了什么问题: 配置项目':react-native-webview'时发生问题。

compileSdkVersion未指定。

尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。与--scan一起运行以获得完整的见解。

在32秒内失败

错误无法安装该应用程序。确保已设置Android开发环境:https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment。使用--verbose标志运行CLI以获取更多详细信息。错误:命令失败:gradlew.bat app:installDebug -PreactNativeDevServerPort = 8081

失败:构建完成,有2次失败。

1:任务失败,出现异常。

  • 其中: 构建文件'C:\ Users \ trann \ Desktop \ Mobile Apps \ Sitter \ Sitter \ node_modules \ react-native-webview \ android \ build.gradle'行:26

  • 出了什么问题: 评估项目':react-native-webview'时发生问题。

无法初始化org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt类

尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。与--scan一起运行以获得完整的见解。

2:任务失败,出现异常。

  • 出了什么问题: 配置项目':react-native-webview'时发生问题。

compileSdkVersion未指定。

尝试: 使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行,以获取更多日志输出。与--scan一起运行以获得完整的见解。

在32秒内失败

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 个答案:

没有答案