android studio Unsupported Modules Detected: Compilation is not supported for following modules: foobar. の対処方法

android studioで↓みたいな警告が出続ける場合の対処法

Unsupported Modules Detected: Compilation is not supported for following modules: common_library. 
Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.

原因と対処

おそらくstudioのバグ。
↓で解決できます。

  1. プロジェクトを閉じる
  2. android studioを閉じる
  3. .ideaディレクトリを削除する
  4. .imlファイルを全て削除する
  5. android studioを起動してプロジェクトを開く

dev

Posted by sakony