I updated Android Studio to 1.4.1 version. gradle sync said needs to version 2.2.1. I downloaded gradle 2.2.1 and in file-->settings-->gradle set use default gradle wrapper and in 'project location/gradle/wrapper/gradle-wrapper.properties' set distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip.
but android studio has errors:
Error:A problem occurred configuring root project 'Scanner'.
Could not resolve all dependencies for configuration ':classpath'. Could not resolve com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api. Required by: :Scanner:unspecified > com.android.tools.build:gradle:2.2.1 > com.android.tools.build:gradle-core:2.2.1 Could not resolve com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api. Could not parse POM https://jcenter.bintray.com/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.pom Content is not allowed in prolog.
what is problem? and how can solve this?
gradle file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}