0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Kotlin1.3.30に上げるとktlintでPROPERTY_DELEGATEエラーが出る

Last updated at Posted at 2019-04-22

バージョン

Kotlin 1.3.30
kotlinter-gradle 1.23.1

現象

> Task :app:lintKotlinAndroidTest FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintKotlinAndroidTest'.
> There was a failure while executing work items
   > A failure occurred while executing org.jmailen.gradle.kotlinter.tasks.lint.LintWorkerRunnable
      > PROPERTY_DELEGATE

原因

ktlint 0.31.0 が Kotlin 1.3.30 に対応できてないのが問題のようです。

This does happen from time to time since ktlint depends on internal compiler details of kotlin which this plugin get transitively.
Upgrading to Kotlin 1.3.30 causes "A failure occurred while executing org.jmailen.gradle.kotlinter.tasks.lint.LintWorkerRunnable > PROPERTY_DELEGATE" · Issue #93 · jeremymailen/kotlinter-gradle

解決方法

2019年4月22日現在、解決方法はなさそうです。素直にKotlinを1.3.21に戻しましょう。

ただ、ktlintの方には対応PRがマージされていて(Upgrade to kotlin 1.3.30 by jeremymailen · Pull Request #376 · pinterest/ktlint)リリース待ちのステータスのようなので、すぐに解決しそうです。

[2019年5月24日追記]

ktlint0.32.0がリリースされ、kotlinter-gradleも1.24.0で内部のktlintバージョンが上がったので、直ったようです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?