Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0

截圖

> Task :app:compileDebugKotlin FAILED
e: D:\androidSpace\MvvpCi\app\src\main\java\dae\rounder\ui\presentation\GameListAdapter.kt: (17, 17): Unresolved reference: lifecycleOwner
e: D:\androidSpace\MvvpCi\app\src\main\java\dae\rounder\ui\presentation\PlayerListAdapter.kt: (17, 17): Unresolved reference: lifecycleOwner
e: D:\androidSpace\MvvpCi\app\src\main\java\dae\rounder\ui\presentation\PlayerStatusListAdapter.kt: (17, 17): Unresolved reference: lifecycleOwner

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 6s
19 actionable tasks: 1 executed, 18 up-to-date

原因:gradle版本過高

  1. 建議升級AS到3.5
  2. 修改project\gradle\wrapper\gradle-wrapper.properties 裏面的distributionUrl值
  3. databinding 在gradle6.0之後做了AndroidX的不兼容更新
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章