Teach new users step by step to solve: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to and update gradle problems, environmentvariable
Android studio problems: Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to I. Problem Principle
In fact, the problem is also very clear, that is, the plug-in is too old to be updated.
The following is a good example, but the principle is the same for a long time ago:
This is my appgradleFile:
android { compileSdkVersion 22 buildToolsVersion "22.0.0" defaultConfig { applicationId "xxx.xxxxxx.xxxxx" versionCode 1 versionName '1' minSdkVersion 9 targetSdkVersion 22 versionCode 1 versionName '1' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.0.0' compile 'com.google.android.gms:play-services:6.5.87' compile 'com.android.support:recyclerview-v7:21.0.0' compile 'com.android.support:cardview-v7:21.0.0' compile 'com.facebook.android:facebook-android-sdk:3.21.1' testCompile 'junit:junit:4.12' compile project(':volley')}
This is my topbuild.gradle:
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.1.0-rc1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }}allprojects { repositories { jcenter() }}
1. The gradle version above is too old
You need to set: classpath 'com. android. tools. build: gradle: 1.1.0-rc1'
Change:
Classpath 'com. android. tools. build: gradle: 1.1.3 '// latest 2.2.0-alpha1
Now the gradle version has been updated to 2.13. It is basically a problem with gradle.
2.Appbuild.gradle:
Change:
Compile 'com. android. support: recyclerview-v7: 21.0.0 'compile 'com. android. support: cardview-v7: 21.0.0'
To:
Compile 'com. android. support: recyclerview-v7: 22.0.0 '// latest23.1.1compile 'com. android. support: cardview-v7: 22.0.0' // latest23.1.1
Open SDK Manager and update the dependent package. Generally, you can update it to the latest version.
Below are some plug-in URLs:
Gradle: https://gradle.org/downloads
Always check the Android SDK Manager for the latest revisions:
Android Build Tools Plugin: http://tools.android.com/tech-docs/new-build-system
Android Support library: http://developer.android.com/tools/support-library/features.html
To view the latest plugin releases, view the Bintray Jcenter page directly: https://bintray.com/android/android-tools/com.android.tools.build.gradle/view.
Can refer to this answer: http://stackoverflow.com/questions/29063968/plugin-is-too-old-please-update-to-a-more-recent-version-or-set-android-daily
Ii. Update gradle
This update of gradle is really a pitfall. Baidu has found many solutions for a long time, but it is really concise !!! Some of the main steps are omitted. What should I do if I am a newbie !! Summary:
This is an offline update. If the FQ online update is the same, you can skip step 1 for online update and start from step 2.
1. Go to gradle official website to the latest gradle down, Gradle Official Website: https://gradle.org/downloads attention: Download do not unzip!
2. Find the gradle/wrapper/gradle-wrapper.properties file under the root directory of your project and modify the file content:
#Mon Dec 28 10:00:20 PST 2015distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distszipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/distsdistributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
Is to change the last line: distributionUrl = https \: // Region.
3. The third step is very important. First open your Gradle user home. The default value is C: \ Users \ [your current user name] \. gradle. Expand by path, but do not touch anything
Enter gradlew-v in Terminal of Android Studio
Execute this command to automatically download the version set above: 2.13. I have downloaded it, So gradle 2.13 is displayed.Note that the gradlew-v command will generate the gradle-XXX-all folder and the folder with garbled names. At that time, I was very worried about other people's methods.How is a folder with garbled names generated!
After the command is executed, it is shown that Downloading distributionUrl = https \: // services.gradle.org/distributions/gradle-2.13-all.zip // is basically the same. It indicates that it is being downloaded. If you want to update the FQ online, wait, I tried FQ, and the speed is also acceptable.
At this time, you should pay attention to the folder opened above, and constantly refresh to see if the latest gradle folder is generated. With this folder, a folder named garbled folder is opened, gradle-2.13-all \ 1b9wlm73elu4cqnbc0rk7r7qn // This Is My
After the folder is generated, you can turn off android studio.
4. Copy the compressed package in step 1 to the garbled folder generated above, open android studio, and enter gradlew-v in Terminal to automatically decompress the package. You only need to wait. :
After decompression:
Now your gradle is updated to the latest version.
Can refer to this: http://www.cnblogs.com/leo-lsw/p/gradle-first-created-error.html
After a long time, I finally understood this problem. In summary, I hope this will help new users like me ....
Reprinted with the source: http://www.cnblogs.com/jycboy/p/5534009.html