1
1

More than 3 years have passed since last update.

intellijでdoma2の実装クラスが自動生成されない場合の解決法

Last updated at Posted at 2021-02-25

概要

通常doma2ではinterfaceを実装してbuildするとその実装クラスが自動で生成される。
しかしintellijのbuildボタン(緑のボタン)でbuildを行う場合、この自動生成が行われず、DBからのデータ取得に失敗する場合がある。

自分含めまわりで何人かハマっている人がいたのでその際の解決法を記載

原因と解決法

preference/Build,Execution,Deployment/Build tools/Gradle
でintellijのbuildボタンで行う処理が設定できる。
ここの
Build and run using:

がデフォルトではGradleになっているが、既存ファイルを開いた時にIntellij IDEAになっている事があり、その場合はdomaクラスが自動生成されない。

その場合は画像のようにデフォルトのgradleに戻してから再起動すればdoma実装クラスが自動生成できる様になっているはず
スクリーンショット 2021-01-15 17.45.36.png

1
1
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
1
1