Android StudioでCannot obtain the application IDエラーが出た

AndroidStudio上で git pull したらCannot obtain the application IDエラーが出た

AndroidStudio上で Update Project(git pull)をしたところ、下記のエラーが突然出ました。 Run/Dubug Configurationsダイアログにエラーメッセージが出ていました。

Error: Run configuration app is not supported in the current project. Cannot obtain the application ID.

Update Projectを実行する前までは一切エラーは発生しておらず、エミュレーターデバッグもできていました。

キャッシュクリアで解決?

よく分かりませんが下記の方法で解決しました。

エミュレータデバッグもできました。

  1. AndroidStudioで、File > Invalidate Caches と進み、Invalidate Cachesダイアログを表示させる
  2. Clear VCS Log caches and indexesにチェックが入っていることを確認する
  3. Invalidate and Restartを押す
  4. AndroidStudioが自動で再起動する
  5. エラーが消えていることを確認する