有关kotlin配置butterknife的问题
在app下的build.gradle中:
applyplugin:'kotlin-android'
applyplugin:'kotlin-android-extensions'
在dependencies中设置
dependencies {
implementation'com.jakewharton:butterknife:8.8.1'
kapt"com.jakewharton:butterknife-compiler:8.8.1"
}
在project下的build.gradle中:
buildscript {
ext.kotlin_version ='1.2.10'
ext.kotlin_version ='1.1.51'
ext.butterknife_version='8.6.0'
dependencies {
classpath'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath"org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"
}
}
然后进行编译就可以了