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

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

问题描述

我正在尝试使用Kotlin Coroutine的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的推荐方法是什么?还是有与Kotlin 1.2.51兼容的另一种类似于runBlocking的方法?

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天全站免登陆