Monday, 6 February 2017

gradle version isssue


when you get an new project and your project doesn't compile, then you need to upgrade your grade:



http://stackoverflow.com/questions/34749299/gradle-version-2-2-is-required-current-version-is-2-10




down voteaccepted
  1. Open gradle-wrapper.properties
  2. Change this line:
     distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
with
        distributionUrl=https\://services.gradle.org/distributions/gradle-2.8-all.zip
  1. Go to build.gradle (Project: your_app_name)
  2. Change this line
     classpath 'com.android.tools.build:gradle:XXX'
to this
     classpath 'com.android.tools.build:gradle:2.0.0-alpha3'
or
     classpath 'com.android.tools.build:gradle:1.5.0'
  1. Don't click Sync Now
  2. From menu choose File -> Invalidate Caches/Restart...
  3. Choose first option: Invalidate and Restart
Android Studio would restart. After this, it should work normally
Hope it help

No comments:

Post a comment