Information:Gradle tasks [:app:assembleDebug]
/Users/liwei/Desktop/Schedule/app/src/main/java/com/schedule/MainActivity.kt
Error:(5, 16) Unresolved reference: os
Error:(12, 8) Unresolved reference: java
Error:(13, 8) Unresolved reference: java
Error:(21, 5) 'onCreate' overrides nothing
Error:(21, 47) Unresolved reference: Bundle
Error:(27, 26) Unresolved reference: SimpleDateFormat
Error:(28, 20) Unresolved reference: Date
Error:(28, 25) Unresolved reference: System
Error:(31, 19) Unresolved reference: Calendar
Error:(35, 41) Unresolved reference: Calendar
Error:(46, 47) Type mismatch: inferred type is MainActivity but Context was expected
Error:(49, 25) Type mismatch: inferred type is kotlin.String but java.lang.String was expected
Error:(50, 24) The integer literal does not conform to the expected type Object
Error:(52, 45) Type mismatch: inferred type is MainActivity but Context was expected
Error:(55, 25) Type mismatch: inferred type is kotlin.String but java.lang.String was expected
Error:(56, 24) The integer literal does not conform to the expected type Object
Error:(58, 45) Type mismatch: inferred type is MainActivity but Context was expected
Error:(61, 25) Type mismatch: inferred type is kotlin.String but java.lang.String was expected
Error:(62, 24) The integer literal does not conform to the expected type Object
Error:(64, 44) Type mismatch: inferred type is MainActivity but Context was expected
Error:(67, 25) Type mismatch: inferred type is kotlin.String but java.lang.String was expected
Error:(68, 24) The integer literal does not conform to the expected type Object
Error:(70, 37) Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public val [ERROR : ].tab: PagerBottomTabLayout! defined in kotlinx.android.synthetic.main.activity_main
Error:(84, 5) Class 'OnTabItemlistener' must be declared abstract or implement abstract member public abstract fun onSelected(p0: Int, p1: Object!): Unit defined in me.majiajie.pagerbottomtabstrip.listener.OnTabItemSelectListener
Error:(85, 9) 'onSelected' overrides nothing
Error:(86, 19) Unresolved reference: UnsupportedOperationException
Error:(89, 9) 'onRepeatClick' overrides nothing
Error:(90, 19) Unresolved reference: UnsupportedOperationException
Error:Execution failed for task ':app:compileDebugKotlinAfterJava'.
Compilation error. See log for more details Information:BUILD FAILED Information:Total time: 8.812 secs Information:29 errors Information:0 warnings Information:See complete output in console錯誤:執行失敗的任務 ':應用程序:compileDebugKotlinAfterJava'
科特林錯誤 我不下來 總是出現這類問題 請 幫助 感謝
這ext.kotlin_version =「1.0.2-1」 可能是問題與數據綁定庫,刪除所有數據綁定依賴和代碼。 – piotrek1543