在常见的kotlin / native模块中使用时,编译器无法识别任何kapt依赖项
apply plugin: 'konan'
apply plugin: 'kotlin-platform-common'
apply plugin: 'kotlin-kapt'
repositories {
mavenCentral()
}
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib"
compile "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlin_version"
compile "com.jakewharton:butterknife:8.8.1"
//kapt "com.jakewharton:butterknife-compiler:8.8.1"
}
konan.targets = ['iphone', 'iphone_sim']
def frameworkName = 'XplatformAnalytics'
konanArtifacts {
framework(frameworkName)
}
2 回答
Kotlin / Native目前不支持kapt或任何其他kotlinx库 . 我们可以在应用程序的android平台中使用kapt,但不能在主要的公共模块本身中使用 .