I'm facing this problem currently. The project did't have any build problems previously. Only today when I was trying to build it gives this error.
Gradle: A problem occurred configuring project ':Project'.
Could not resolve all dependencies for configuration ':Project:classpath'.
Could not download artifact 'org.ow2.asm:asm-analysis:4.0#jar'
Artifact 'org.ow2.asm:asm-analysis:4.0#jar' not found.
Seems like asm-analysis:4.0 is not found in maven repo.
(Is this link correct? http://search.maven.org/#browse%7C1692005229)
Inside my build.gradle file, I've set the repository to mavenCentral()
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
} }
I am not sure how to fix this problem, any suggestion is appreciated.
Thank you.
Faced the same problem, ow2.org has separate repository
buildscript {
repositories {
maven { url "http://repository.ow2.org/nexus/content/repositories/releases/" }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
Related
Inherited a project and am trying to run the build.gradle but the dependency is no long on maven... and I have googled and can't find any other active repos. There's a vaadin-spring 1.0.1 but I don't know if that's the same thing. Any body else run into this issue?
buildscript {
repositories {
//jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.2.RELEASE")
classpath('fi.jasoft.plugin.vaadin:fi.jasoft.plugin.vaadin.gradle.plugin:1.0.1')
}
}
apply plugin: "fi.jasoft.plugin.vaadin"
The error:
Could not get resource 'http://dl.bintray.com/johndevs/maven/fi/jasoft/plugin/gradle-vaadin-plugin/1.0.1/gradle-vaadin-plugin-1.0.1.jar'.
> Could not HEAD 'http://dl.bintray.com/johndevs/maven/fi/jasoft/plugin/gradle-vaadin-plugin/1.0.1/gradle-vaadin-plugin-1.0.1.jar'. Received status code 502 from server: Bad Gateway
I tried to do a > build gradle and got the error. I have also tried importing a cache on a teammate that has it working but it does not recognize the cache I have imported by replacing my ~/.gradle with my teammates files
It looks like you've added a dependency on the wrong Maven coordinates.
Looking in the Gradle Plugin Portal I can see that the dependency should be classpath("fi.jasoft.plugin:gradle-vaadin-plugin:1.0.1")
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// wrong coordinates:
// classpath('fi.jasoft.plugin.vaadin:fi.jasoft.plugin.vaadin.gradle.plugin:1.0.1')
// correct coordinates:
classpath("fi.jasoft.plugin:gradle-vaadin-plugin:1.0.1")
}
}
The coordinates you had used, fi.jasoft.plugin.vaadin:fi.jasoft.plugin.vaadin.gradle.plugin:1.0.1, do actually exist in the Gradle Plugin Portal Maven repo, but there's no JAR. Why is this?
The reason for this is that Gradle plugins require a marker artifact, so that Gradle can identify plugins using an ID in the plugins block DSL.
For this reason, I recommend you replace using the buildscript {} block to define plugins, and instead use the new plugins {} block.
plugins {
id "fi.jasoft.plugin.vaadin" version "1.0.1"
}
Here is my issue :
When i run my mainClass as java application everything goes good :
but when i run ./gradle run springboot dependencies not found in the classPath :
the build.gradle : GitHub Repository link to file
Can anyone try to fix with me the issue i ll be more than glad !!!
I managed to resolve the issue by adding this in the build.gradle :
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://nexus.gluonhq.com/nexus/content/repositories/releases'
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:2.0.30'
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.3.3.RELEASE"
}
}
apply plugin: 'application'
dependencies {
compile "org.springframework.cloud:spring-cloud-starter-feign:1.4.7.RELEASE"
}
And now when i run /.gradle run -> it shows
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
I am working on android (Java) and trying to consume websockets so I thought I would use this tutorial and they are using dependency org.java-websocket:Java-WebSocket:1.3.0 from this repo which has now become 1.3.1.
So I have in my modular build.gradle
dependencies {
...
compile 'org.java-websocket:Java-WebSocket:1.3.1'
...
}
and in my project / top level build.gradle I have
repositories {
jcenter()
maven { url 'http://clojars.org/repo' }
}
and I am getting error
Error:(49, 13) Failed to resolve: org.java-websocket:Java-WebSocket:1.3.1
Try it with lowercase:
compile 'org.java-websocket:java-websocket:1.3.1'
It worked for me.
Edit:
the project level gradle file:
buildscript {
repositories {
jcenter()
maven { url 'http://clojars.org/repo' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
allprojects {
repositories {
jcenter()
maven { url 'http://clojars.org/repo' }
}
}
I was also facing same issue ,I restarted Android Studio and sync again,it build successfully.
I imported a project to android studio and it was loading and then it gave me an error this is the error i am getting
please help me out with this so my imported project should work properly and my sdk and everything is updated i am using android studio version 2.1.1
Try to add following buildscript repository and dependency
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}