Learn to Live and Live to Learn

IT(たまにビジネス)に関する記事を読んで、考えて、使ってみたことをまとめる場。

this version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run

エラー内容

git cloneしてきたアプリをrunしようとしたら,こんなメッセージが出てヒーってなったんですが,あっさり解決できたんで方法を記したいと思います.

this version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run
(Android Studioのこのバージョンは使われているGradle Pluginと互換性がないよ.Instant Runを無効にしてみてね)

解決方法

Android Studioのバージョンによって設定方法が微妙に異なると思いますが,私の使っているAndroid Studio2.1系のやり方です.

①Instant Runの設定変更

Android Studio>Preferences>Build, Execution, Deployment>Instant Runで

  • Enable Instant Run to hot swap code/resource change on deploy (default enabled)←Instant Runを有効にするか
  • Show Instant Run status notifications←Instant Rundに関する通知を表示するか(こちらはチェックつけてもつけなくても変わらない気がする)

のチェックを外す.

②Clean Project

Build>Clean Projectをする.

③いつも通りrun!

参考

stackoverflow.com