Could not resolve all files for configuration ':app:debugRuntimeClasspath'. problem - java

I have next problem with my android studio
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
I allready tried this solutions but not working.
Android studio 3.2.1 ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'
Error "Could not resolve all files for configuration" in Android Studio
problem ocours when i add dependency from thirdpart library to gradle.

Make sure your settings.gradle file has the maven url maven { url='https://jitpack.io'}
Should look like this :
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven { url='https://jitpack.io'}
}

Related

Could not find build gradle 3.0.1

Any clarification on this subject would be greatly appreciated.
I know this has been answered many times but my current issue is that I don't know where or in what file (s) to add this to:
buildscript {
repositories {
...
google() // <-- add this
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
And this:
allprojects {
repositories {
jcenter()
google()
}
}
Or if that even solves my issue, since I haven't tested it yet.
My initial problem:
The issue seemed to appear after updating both gradle and Android studio.
I'm currently working on a project using libGDX to make an Android app called CastleCrush. When I try to launch a desktop application to test it, it won't launch, and I get this error:
Error:Gradle: A problem occurred configuring root project
'CastleCrush'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:3.0.1.
Searched in the following locations:
file:/Users/TrulsElg/.m2/repository/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
file:/Users/TrulsElg/.m2/repository/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar
Required by:
project :
When launching with a virtual Android device it launches just fine.
I'm not working on this project alone and collaboration is done via Git, if that makes any difference. None of the other project members seem to have this issue.
You add this to your Project build.gradle file. its the gradle file that is called build.gradle(Project: your project name). It is usually the first one if you are in the Android project view
Could not find com.android.tools.build:gradle:3.0.1.
Gradle trying to find Android Gradle plugin version 3.0.1 artifact from your local maven repo (inside your computer) and from your listed three remote repository (maven2, oss.sonatype and jcenter).
But not succeeded because given artifact is not available on those repository.
Artifact com.android.tools.build:gradle:3.0.1 is available on google repository.
Find build.gradle file inside your libgdx project and add google maven repo inside allprojects tag
repositories {
mavenLocal()
mavenCentral()
maven { // <-- Add this
url 'https://maven.google.com/'
name 'Google'
}
}
If you're using Android Studio 3.0 or latter version
repositories {
mavenLocal()
mavenCentral()
google() //---> Add this
}
Make sure you're proper internet connection.
Cross-check that, you've not ticked offline work in Global gradle settings.
Before proceeding further take a look on LibGdx doesn't working after updating Gradle (Android Studio 3.0)

Could not find com.github.scottyab:showhidepasswordedittext:0.6

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

Gradle Project sync failed - Android Studio Gradle Build 2.20

My gradle project keeps failing to sync properly in Android Studio.
I am trying to use a project already built to sync up parse with android studio.
Here is the log.
Any tips?
Error:Could not find com.android.tools.build:gradle:2.2.0.
Searched in the following locations:
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.jar
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.0/gradle-2.2.0.jar
Required by:
project :
The Android gradle plugin is in BinTray, not Maven Central (https://repo1.maven.org/maven2)
Replace mavenCentral() with jcenter() in the bulid.gradle repositories section
Also add google() or maven { url 'https://maven.google.com' } if using Gradle version < 4.0
Refer:
https://developer.android.com/studio/build/dependencies.html#remote_repositories
https://developer.android.com/studio/build/index.html#settings-file

Could not find com.android.tools.build:gradle:2.2.2

A friend of mine copy pasted a libgdx project folder on his pc and sent the project to me(through google drive). We are both using Android Studio. I downloaded and imported the project and it is working properly on the emulator. However it is not working on the desktop. On his pc, it works both in desktop and in the emulator.
When I try to run it in the desktop, Android Studio gives me this error message:
Error:Gradle: A problem occurred configuring root project 'bouncerGDX - Copy'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:2.2.2.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jar
https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jar
Required by:
:bouncerGDX - Copy:unspecified
How can I fix this? I have no experience with Gradle.
UPD:
It seems can't resolve com.android.tools.build:gradle:2.2.2 dependency for the classpath.
For me, adding the jcenter to build.gradle resolves the issue:
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
or, alternatively, the line in build.gradle
classpath 'com.android.tools.build:gradle:2.2.2'
can be changed to
classpath 'com.android.tools.build:gradle:2.1.3'
^^^ this version exist in repo1.maven.org
WRONG SUGGESTION:
Resolve all dependencies by running gradle task (can be done from Android Studio's terminal):
For Linux:
./gradlew buildDependents
For Windows:
gradlew.bat buildDependents
Also, this commands might also help later
Linux:
./gradlew cleanIdea idea
Windows:
gradlew.bat cleanIdea idea
This is the reference to libgdx How-to-setup-development-env instruction
I was getting the same issue after updating Android Studio 2.2.2 to 2.3.1
Could not find com.android.tools.build:gradle:2.2.2.
Solution:
Open the gradle location and make changes in build.gradle accordingly(module and project both)
I replaced
classpath 'com.android.tools.build:gradle:2.2.2'
with
classpath 'com.android.tools.build:gradle:2.3.1'
And gradle build successfully :-)
gradle location
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}
add google() below jcenter(),this works for me
Seems like you hav dependency on the library project bouncerGDX
You can open build.gradle of that project and change gradle version which is available with you. e.g.
classpath 'com.android.tools.build:gradle:2.1.0'
My fix for the same error was to configure Android Studio for the proxy I'm stuck behind.
Android Studio + Gradle did not assume system proxy settings, at least not on my copy of macOS. Set your proxy settings in Preferences > Appearance & Behavior > System Settings > HTTP Proxy, save them and restart Android Studio. It then prompted me to set Gradle's proxy settings to match Android Studio's. Once I did this, no more error.
Adding the maven url solved the issue for me.
buildscript {
repositories {
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
}
}
[Solution For Android 2.3.1 built in 2017 April]
In gradle.build(Project)
Add missing repositories
mavenLocal() and jcenter()
To
buildscript { repositories { }}
Notice there are TWO gradle.build files!! Pick the right one.
In my case I was updating Gradle as Android Studio recommended
Solution:
When you import the project make sure not to update Gradle (click "Don't remind me again for this project") and it should work.
Note: Use latest gradle version.

gradle 2.0.0 beta 7 missing

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
}
}

Categories

Resources