![](/img/trans.png)
[英]Assignments are not expressions and only expressions are allowed in this context - Kotlin
[英]If statement: Assignments are not expressions, and only expressions are allowed in this context kotlin
我的 if 语句中不断收到错误消息:
fun someFunction(){
if (requestCode == 0 && resultCode = Activity.RESULT_OK && data != null) {
// Do stuff
}
}
应该是resultCode == Activity.RESULT_OK
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.