I got this error in Gradle Console
Error:A problem occurred configuring root project 'QuakeReport'.
Could not resolve all files for configuration ':classpath'.
Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
Required by:
project :
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 41s
I got this error in messages
Error:A problem occurred configuring root project 'QuakeReport'.
Could not resolve all files for configuration ':classpath'.
Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
Required by:
project :
try adding this to your project level build.gradle.
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Android artifacts are no longer posted to bintray. Use google's repository to your build script.
buildscript {
repositories {
...
// You need to add the following repository to download the
// new plugin.
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
}
See here: https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#apply_plugin
Related
After a while, I opened Android Studio and created a project called 'DaggerTest'. Unfortunately, when my Gradle is getting built, I face this error
A problem occurred configuring root project 'DaggerTest'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find bundletool-1.1.0.jar (com.android.tools.build:bundletool:1.1.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/1.1.0/bundletool-1.1.0.jar
> Could not find transform-api-2.0.0-deprecated-use-gradle-api.jar (com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api/2.0.0-deprecated-use-gradle-api/transform-api-2.0.0-deprecated-use-gradle-api.jar
> Could not find jetifier-processor-1.0.0-beta09.jar (com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta09).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta09/jetifier-processor-1.0.0-beta09.jar
> Could not find jetifier-core-1.0.0-beta09.jar (com.android.tools.build.jetifier:jetifier-core:1.0.0-beta09).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta09/jetifier-core-1.0.0-beta09.jar
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Here are the things that I have done and they did not work:
I allowed Android Studio(studio.exe, studio64.exe) and all java executable files in the windows firewall
I have disabled the windows firewall and it did not work.
I have tried some proxies in Android Studio HTTP proxy settings
I have changed my build Gradle file from this:
buildscript {
repositories {
google() // <-- here
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0-beta03'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
To this:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0-beta03'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I just created a new android project to test something separate to my main one, and this happened. I tried it several times and get the same error every time.
A problem occurred configuring root project 'login_test'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.5.0-release-764/kotlin-gradle-plugin-1.5.0-release-764.pom
Required by:
project :
Possible solution:
- Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
try to change version of kotlin in build.gradle under the root directory.I use 1.3.72 here
buildscript {
ext.kotlin_version = '1.0.0'
ext.kotlin_version = "1.3.72"
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.1"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
I am trying to add this dependency
com.github.scottyab:showhidepasswordedittext:0.6. in an android app. On building the project I am having this error critically
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.github.scottyab:showhidepasswordedittext:0.6.
Required by:
push:app:unspecified
Please what am I doing wrong. Kindly assist
latest version of dependency is :
dependencies {
compile 'com.github.scottyab:showhidepasswordedittext:0.8'
}
and don't forgot to add maven repo in the project-level build.gradle file
allprojects {
repositories {
maven {
url "https://jitpack.io"
}
}
}
for more information check here
When I am importing the project, I am getting the following error:
Error:A problem occurred configuring root project 'BoomMenu-master'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4.
Required by: :BoomMenu-master:unspecified
> No cached version of com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4 available for offline mode.
> Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.3. Required by:
:BoomMenu-master:unspecified
> No cached version of com.github.dcendents:android-maven-gradle-plugin:1.3 available for
offline mode.
There are some solution which i had applied previously that ,
1 . Try to rebuild your project for 2 to 3 times.
2 . Open your build.gradle file and then add line at top that these lines ,here you must choose build gradle version according to your sdk .
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
3. Open your library build.gradle file say in yours you must open boommenu file .
add these lines at top ,
apply plugin: 'com.android.application'
4.Try to changed proxyPort to 8080 and used jcenter instead of Maven. But i had to apply expeption to use HTTP instead of HTTPS. This is what i have in my gradle.build for build script and allprojects
buildscript {
repositories {
jcenter {
url "http://jcenter.bintray.com/"
}
}
}
allprojects {
repositories {
jcenter {
url "http://jcenter.bintray.com/"
}
}
}
I keep getting this error. Any ideas?
What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:classpath'.
Could not find com.android.tools.build:gradle:2.0.0-beta7.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-beta7/gradle-2.0.0-beta7.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.0.0-beta7/gradle-2.0.0-beta7.jar
You are referring maven central for finding android plugin artifacts, android gradle plugin is published at jcenter
add jcenter() to buildscript.repositories block in your root build.gradle file.
It should look like as below:
// 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:X.X.X' // your verison
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}