Android: Kotlin with Butterknife

前端 未结 10 992
鱼传尺愫
鱼传尺愫 2020-12-24 04:55

I\'m trying to use Kotlin with Butterknife for my Android Application.

Here is my build.gradle

dependencies {
    ...
    compile \'com.jakewharton:b         


        
10条回答
  •  攒了一身酷
    2020-12-24 05:29

    you can import all synthetic properties for the free/res/layout/activity_main.xml layout by adding this import:

    import kotlinx.android.synthetic.main.activity_main.*
    

    Now you can access all views by using there id's no need to initiate findbyid

提交回复
热议问题