[英]Kotlin Kapt failing - only sees android api level 1 sources
我看到一些奇怪的行為,當嘗試升級到android gradle插件3.0時,它會導致:app:kaptQaDebugKotlin
失敗。
@TargetApi(VERSION_CODES.KITKAT)
注釋的方法失敗, cannot find symbol
( VERSION_CODES.KITKAT
) VERSION_CODES.KITKAT
DialogInterface.OnShowListener
(在API級別8中添加) DialogInteface.OnClickListener
(在API級別1中添加) Application.ActivityLifecycleCallbacks
(在API級別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
插件。 自動值類正確生成。 知道發生了什么嗎? 看來kapt任務以某種方式使用了android api級別1來源,但我不確定如何解決該問題
每個@pentarex
錯誤來自外部庫logback-android-classic,我不得不排除組:'com.google.android',模塊:'android
implementation(libs.logbackAndroidClassic){
exclude group: 'com.google.android', module: 'android'
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.