Kotlin实战问题汇总
1.
Smart cast to ‘Type’ is impossible, because ‘variable’ is a mutable property that could have been changed by this time
2.
Android studio warning - InnerClass annotations are missing corresponding EnclosingMember annotations
3.
@BindColor fields must not be private or static (Kotlin)
4.
const val are only allowed on top level or in objects
5.
equality check should be used instead of Elvis for nullable boolean check
6.
can be joined with assignment
7
ObjectAnimator.ofFloat can’t take Int as parameters directly in kotlin
val objectY = ObjectAnimator.ofFloat(holder.itemView, View.TRANSLATION_Y, if (goesDown) 200f else -200f, 0f)