LoginSignup
8
8

More than 5 years have passed since last update.

Android Studio 2.0 Previewでbuild.gradleにPlugin is too oldエラーが発生

Last updated at Posted at 2016-01-04

突然エラーが出て、IDEの補完でも修正されず困った。
調べた結果、リモートの最新のバージョンをうまく取れてない模様。
2.0が安定したらなくなることを祈ります。

環境

  • Android Studio 2.0 Preview
  • Mac OS 10.10.5

build.gradleの設定

app/build.gradle
buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-alpha1'
  }
}
build.gradle
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0-alpha1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

エラーメッセージ

Error:(10, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to "xxxx"

対策

1. gradleのバージョンをあげる

  • appディレクトリ内のbuild.gradle内の buildscript > dependencies > classpath のgradleのバージョンを 2.0.0-alpha1 から 2.0.0-alpha3 に変更
  • プロジェクト直下のbuild.gradle内の buildscript > dependencies > classpath のgradleのバージョンを 2.0.0-alpha1 から 2.0.0-alpha3 に変更
app/build.gradle
buildscript {
  repositories {
    jcenter()
  }
  dependencies {
    classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
  }
}
build.gradle
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0-alpha3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

2. Clean Project

Android Studioのメニューバーから、 Build > Clean Project を実行。
無事ビルドに成功。安心安心。

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