Kotlin butterknife build error @BindView fields must not be private or static

    科技2022-07-12  123

    问题描述: 在kotlin中使用Butterknife时出现:

    @BindView fields must not be private or static.

    解决办法,在注解上加上 @JvmField,如下:

    @JvmField @BindView(R2.id.top_title) var topTitle: TextView? = null

    即可解决

    Processed: 0.011, SQL: 8