snowdream / SnowdreamFramework

An Android Framework Build With Gradle
Apache License 2.0
25 stars 6 forks source link

Gradle version 2.2 is required. Current version is 2.13. #12

Closed snowdream closed 8 years ago

snowdream commented 8 years ago

Question:

snowdream@snowdream:~/snowdream/git/SnowdreamFramework$ gradle clean --info
Starting Build
Settings evaluated using settings file '/home/snowdream/snowdream/git/SnowdreamFramework/settings.gradle'.
Projects loaded. Root project using build file '/home/snowdream/snowdream/git/SnowdreamFramework/build.gradle'.
Included projects: [root project 'SnowdreamFramework', project ':modules', project ':modules:app', project ':modules:core', project ':modules:database', project ':modules:http', project ':modules:log', project ':modules:main', project ':modules:resource', project ':modules:util', project ':modules:widgets']
Evaluating root project 'SnowdreamFramework' using build file '/home/snowdream/snowdream/git/SnowdreamFramework/build.gradle'.
Evaluating project ':modules' using build file '/home/snowdream/snowdream/git/SnowdreamFramework/modules/build.gradle'.
Evaluating project ':modules:app' using build file '/home/snowdream/snowdream/git/SnowdreamFramework/modules/app/build.gradle'.

FAILURE: Build failed with an exception.

* Where:
Script '/home/snowdream/snowdream/git/SnowdreamFramework/gradle/scripts/android-library.gradle' line: 1

* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin [id 'android-library']
   > Gradle version 2.2 is required. Current version is 2.13. If using the gradle wrapper, try editing the distributionUrl in /home/snowdream/snowdream/git/SnowdreamFramework/gradle/wrapper/gradle-wrapper.properties to gradle-2.2-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Total time: 9.482 secs
snowdream commented 8 years ago

Solution 1: upgrade the android plugin to the lastest version. http://tools.android.com/tech-docs/new-build-system

snowdream commented 8 years ago

Solution 2: Add the following code in the build.gradle of the top project.

buildscript {
    System.properties['com.android.build.gradle.overrideVersionCheck'] = 'true'

...
}