将Android Studio项目更新为Kotlin 1.3 [英] Update Android Studio Project to 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屋!