3

Showing this error on running my project, I tried all the solution available but it's not working. The only thing left is to set the ANDROID_DAILY_OVERRIDE environment variable, but I am struggling to do so.

How I can set ANDROID_DAILY_OVERRIDE environment variable on a mac?

David Medenjak
  • 33,993
  • 14
  • 106
  • 134
Sujeet Kumar Mehta
  • 2,761
  • 2
  • 20
  • 28
  • 2
    Possible duplicate of [Plugin is too old, please update to a more recent version, or set ANDROID\_DAILY\_OVERRIDE environment variable to](http://stackoverflow.com/questions/29063968/plugin-is-too-old-please-update-to-a-more-recent-version-or-set-android-daily) – Robby Cornelissen Jan 21 '16 at 07:35

3 Answers3

6

Change your build.gradle file to

classpath 'com.android.tools.build:gradle:2.0.0-alpha6'

Also navigate to to yourProjectPath/Gradle/wrapper and open the gradle-wrapper.properties

Change distributionURL with

distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip

I hope this helps

Hemix
  • 303
  • 3
  • 12
4

Since you asked how to set the environment variable on OS X here it goes:

launchctl setenv ANDROID_DAILY_OVERRIDE <your-value-on-error-message>

Restart Android Studio and the project will build again.

Kudos to UPDATE 2 here: https://emmanuelbernard.com/blog/2012/05/09/setting-global-variables-intellij/

Felipe Duarte
  • 1,079
  • 14
  • 20
  • Thanks for the answer. I am still facing the issue. Here is the link of my new question http://stackoverflow.com/questions/35127166/gradle-dsl-method-not-found-comiple-after-putting-gcm-dependency – Sujeet Kumar Mehta Feb 01 '16 at 09:40
  • The problem you're having is not related at all with this issue, I answered there. Also please kindly consider to mark this answer as the correct one in order to help others. – Felipe Duarte Feb 01 '16 at 18:26
0

change classpath in gradle from

classpath 'com.android.tools.build:gradle:2.0.0-beta6'

to:

classpath 'com.android.tools.build:gradle:1.5.0'

then restart its work for me for android studio 2.0 Beta 6