我看到一些奇怪的行为导致:app:kaptQaDebugKotlin
在尝试升级到android gradle插件3.0时失败。
@TargetApi(VERSION_CODES.KITKAT)
注释的方法因cannot find symbol
(VERSION_CODES.KITKAT
)VERSION_CODES.KITKAT
与方法一起使用时已找到DialogInterface.OnShowListener
(在API级别8中添加)DialogInteface.OnClickListener
(在API级别1中添加)Application.ActivityLifecycleCallbacks
(在api level 14中添加)cannot find symbol
类的来源(cmd + B
有效)版本
25
26.0.2
1.1.51
3.0.0
4.3
24.2.1
(也很难升级,但我确实试过25.4.0
但仍然没有运气)2.0.2
(坚持这个旧版本,不幸升级不了)kotlin-kapt
插件。正确生成了autovalue类。知道发生了什么事吗?看起来kapt任务以某种方式使用android api level 1来源,我不知道如何解决这个问题
答案 0 :(得分:0)
Per @pentarex
错误来自外部库logback-android-classic,我不得不排除组:' com.google.android',模块:' android
implementation(libs.logbackAndroidClassic){
exclude group: 'com.google.android', module: 'android'
}