简体   繁体   English

将Android Studio项目更新为Kotlin 1.3

[英]Update Android Studio Project to 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. 我正在尝试使用Kotlin Coroutine的runBlocking函数,但收到的错误是Kotlin 1.3中引入了此方法。

So, I tried updating my Android Studio project to use Kotlin 1.3.0 因此,我尝试更新我的Android Studio项目以使用Kotlin 1.3.0

But, when I do that, I get the error: "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.0" is unresolved ... 但是,当我这样做时,出现错误: "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.0" is unresolved ...

What is the recommended way to update my Android Studio project to use Kotlin 1.3? 建议使用Android Kotlin 1.3更新Android Studio项目的方法是什么? Or is there another method similar to runBlocking that is compatible with Kotlin 1.2.51 ? 还是有另一种与runBlocking类似的方法与Kotlin 1.2.51兼容?

I guess it has different version. 我猜它有不同的版本。 Try to use: 尝试使用:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM