Android plugin is too old (2.4.0-alpha7)
Asked Answered
S

3

19

I'm using android studio 2.4, And getting this error. Apparently I have to update my android plugin, but when I checked jcenter for new versions the only version available was 2.5.0-alpha-preview-02. which would cause the exact same error. I also see somewhere in the error message that it says I must replace the ANDROID_DAILY_OVERRIDE environment variable. But I really have no idea where to put this environment variable? Should it go to local.properties or is it an OS env variable? I was wondering if anybody else is facing this problem.

This is the full message

Error:(1, 0) The android gradle plugin version 2.5.0-alpha-preview-02 is too old, please update to the latest version.
To override this check from the command line please set the ANDROID_DAILY_OVERRIDE environment variable to "8d256f619ba96afd1273947e8b8bebea4cb2fd05"
<a href="fixGradleElements">Upgrade plugin to version 2.4.0-alpha7 and sync project</a><br><a 
href="openFile:C:/Users/hshahdoost/MyWork/BAmooz/Android/build.gradle">Open File</a>
Shaunna answered 1/6, 2017 at 7:29 Comment(4)
Just to let everybody know: Android Studio team "abandoned" working Android Studio 2.4 and focused on future Android Studio 3.0. You can read more about it here: android-developers.googleblog.com/2017/05/…Legible
mine actually says 2.4.0-alpha7 is too old, please update to 2.4.0-alpha7, GGWD googleOverturn
@Overturn well, it's right 2.4.0 is really old now, I suggest you upgrade to 3-RC1 soon. because there are some differences in Gradle that the sooner u face the easier u can solveShaunna
lol, so I should update my 2.4.0-alpha7 to 2.4.0-alpha7? that's all I was commenting onOverturn
K
8

On Windows it can be fixed by adding OS (or local user) environment variable with key "ANDROID_DAILY_OVERRIDE" and value "8d256f619ba96afd1273947e8b8bebea4cb2fd05" and restart Android Studio after that. After migrating to Android Studio 3.x it's better to remove this anvironment variable back.

Kempis answered 1/6, 2017 at 8:41 Comment(0)
H
20

There is a 40 day limit for beta/alpha versions and after that, Android Studio forces you to update to the latest version.

But it doesn't exist (the newest is the alpha with AS 3.0) so a possible solution is setting that environment variable, executing in the command line (in MAC):

launchctl setenv ANDROID_DAILY_OVERRIDE 8d256f619ba96afd1273947e8b8bebea4cb2fd05

And relaunch Android Studio

Heather answered 1/6, 2017 at 8:26 Comment(3)
In MAC, for windows or linux, you have to set an environment variableHeather
What the value 8d256f619ba96afd1273947e8b8bebea4cb2fd05 exactly means?Zeb
For Windows command line use: setx ANDROID_DAILY_OVERRIDE 8d256f619ba96afd1273947e8b8bebea4cb2fd05 Also make sure to restart your Android Studio after you set the variableClower
K
8

On Windows it can be fixed by adding OS (or local user) environment variable with key "ANDROID_DAILY_OVERRIDE" and value "8d256f619ba96afd1273947e8b8bebea4cb2fd05" and restart Android Studio after that. After migrating to Android Studio 3.x it's better to remove this anvironment variable back.

Kempis answered 1/6, 2017 at 8:41 Comment(0)
F
2

My solution in Ubuntu:

cd /etc
sudo gedit environment

add to end of 'environment' file: ANDROID_DAILY_OVERRIDE="your_value"

save and reboot

Fertilizer answered 1/8, 2017 at 19:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.