I'm seeing some weird behavior that causes :app:kaptQaDebugKotlin
to fail when attempting to upgrade to android gradle plugin 3.0.
@TargetApi(VERSION_CODES.KITKAT)
fails with cannot find symbol
(VERSION_CODES.KITKAT
)VERSION_CODES.KITKAT
when used inline with a method is foundDialogInterface.OnShowListener
(added in API level 8)DialogInteface.OnClickListener
is found (added in API level 1)Application.ActivityLifecycleCallbacks
(added in api level 14)cannot find symbol
classes (cmd + B
works)Versions
25
26.0.2
1.1.51
3.0.0
4.3
24.2.1
(would be difficult to upgrade this too, but I did try 25.4.0
and still no luck)2.0.2
(stuck on this old version, can't upgrade unfortunately)kotlin-kapt
plugin. autovalue classes are correctly generated.Any idea what's going on? It looks like the kapt task is somehow using android api level 1 sources, and I'm not sure how to troubleshoot that
Per @pentarex
error was coming from external library logback-android-classic, i had to exclude group: 'com.google.android', module: 'android
implementation(libs.logbackAndroidClassic){
exclude group: 'com.google.android', module: 'android'
}