入Kotlin之坑-解决Kotlin错误:Smart cast is impossible, because the property could have been changed by th...

问题刚刚入了kotlin的坑,对之前的base 库进行全面kotlin语言替换的时候出现了这个问题。 问题如下: Smart cast is impossible, because ‘phone’ is a mutable property that could have been changed by this time 几个意思呢?? 原因 查了一下发现是因为kotlin遵循的安全规则,不允许向列表添加Nullable值,在别的线程可以对Nullable值phone做修改,这样在...

Read More


Powered by Hexo

Copyright © 2017 - 2018 Shero's Blog All Rights Reserved.

UV : | PV :