I am not able to solve the issue of associated with the gradle file.For Solving this issue i have downloaded the android studio 3.0 beta 6, in which the project is not builded. And in Android studio 2.3.2 following issue came
top level gradle
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
issues
Error:Could not find com.android.tools.build:gradle:3.0.0-beta2.
Searched in the following locations:
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0-beta2/gradle-3.0.0-beta2.pom
file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/3.0.0-beta2/gradle-3.0.0-beta2.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-beta2/gradle-3.0.0-beta2.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0-beta2/gradle-3.0.0-beta2.jar
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.0.0-beta2/gradle-3.0.0-beta2.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.0.0-beta2/gradle-3.0.0-beta2.jar
Required by:
project :
EDIT:
Just added the google maven repo:
top level gradle
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url "https://maven.google.com" }
}
dependencies {
// classpath 'com.android.tools.build:gradle:3.0.0-beta6'
classpath 'com.android.tools.build:gradle:3.0.0-beta6'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
classpath 'org.greenrobot:greendao-gradle-plugin:3.2.2'
}
}
//allprojects {
// repositories {
// jcenter()
// maven { url "https://maven.google.com" }
// maven { url 'https://jitpack.io' }
// }
//}
task clean(type: Delete) {
delete rootProject.buildDir
}
Gradle wrapper
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
#distributionUrl= https\://services.gradle.org/distributions/gradle-4.1-rc-1-all.zip
EDIT:
Just after uncommenting the allproject
block
error How can this issue be solved? I have watched many solution on stack but not able to solve this issue
repositories {
jcenter()
...
// You need to add the following repository to download the
// new plugin.
maven { url "https://maven.google.com" } //THIS
google() //OR THIS
}
Also delete .gradle and gradle folder and resync the project. Issues with caches
You have to add the maven google also in the buildscript
block in the top-level build.gradle
file:
buildscript {
repositories {
jcenter()
...
// You need to add the following repository to download the
// new plugin.
maven { url "https://maven.google.com" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta6'
//...
}
}
This version of the plugin also requires an update version of gradle. You have to update the distributionUrl
in gradle-wrapper.properties
as follows:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
More info about the plugin 3.0.x here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With