Kotlin实战问题汇总

Kotlin实战问题汇总

1.
Smart cast to ‘Type’ is impossible, because ‘variable’ is a mutable property that could have been changed by this time
Kotlin实战问题汇总_第1张图片
2.
Android studio warning - InnerClass annotations are missing corresponding EnclosingMember annotations
Kotlin实战问题汇总_第2张图片
3.
@BindColor fields must not be private or static (Kotlin)
Kotlin实战问题汇总_第3张图片
4.
const val are only allowed on top level or in objects
Kotlin实战问题汇总_第4张图片
5.
equality check should be used instead of Elvis for nullable boolean check
Kotlin实战问题汇总_第5张图片
6.
can be joined with assignment
Kotlin实战问题汇总_第6张图片
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)

你可能感兴趣的:(android)