Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable

北城余情 提交于 2019-12-07 17:40:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!