将 Android Studio 项目更新到 Kotlin 1.3 [英] Update Android Studio Project to Kotlin 1.3

查看:52
本文介绍了将 Android Studio 项目更新到 Kotlin 1.3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Kotlin 协程的 runBlocking 函数,但我收到错误消息,该方法是在 Kotlin 1.3 中引入的.

I am attempting to Use Kotlin Coroutine's runBlocking function, but I receive the error that this method was introduced in Kotlin 1.3.

所以,我尝试更新我的 Android Studio 项目以使用 Kotlin 1.3.0

So, I tried updating my Android Studio project to use Kotlin 1.3.0

但是,当我这样做时,出现错误:"org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.0" is unresolved...

But, when I do that, I get the error: "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.0" is unresolved...

更新我的 Android Studio 项目以使用 Kotlin 1.3 的推荐方法是什么?或者有没有其他类似runBlocking的方法兼容Kotlin1.2.51?

What is the recommended way to update my Android Studio project to use Kotlin 1.3? Or is there another method similar to runBlocking that is compatible with Kotlin 1.2.51?

推荐答案

我猜它有不同的版本.尝试使用:

I guess it has different version. Try to use:

实现'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.0'

implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.0'

这篇关于将 Android Studio 项目更新到 Kotlin 1.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆