Android Studio, gradle plugin is too old or set ANDROID_DAILY_OVERRIDE

Android Studio, gradle plugin is too old or set ANDROID_DAILY_OVERRIDE

早上開啟Android Studio,忽然報了個錯,說gradle plugin版本過低,讓更新或者設定ANDROID_DAILY_OVERRIDE環境變數:

日誌如下:

INFO – ls.idea.gradle.GradleSyncState – Sync with Gradle for project ‘advance’ failed: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to “15d1beac634bce32a315b0ad7c3040f2104f6d3”

檢視主gradle檔案:

gradle版本為2.2.0-beta1,修改為2.2. ,如下圖:

然後,就好了。