问题
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?
回答1:
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
回答2:
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/
回答3:
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
来源:https://stackoverflow.com/questions/34917774/plugin-is-too-old-please-update-to-a-more-recent-version-or-set-android-daily