Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle Dependencies issue: Could not find org.jetbrains.trove4j

I'm trying to list my project's dependency tree. So I ran gradle dependencies and got the following:

FAILURE: Build failed with an exception. What went wrong: A problem occurred configuring root project 'Android'. Could not resolve all files for configuration ':classpath'. Could not find org.jetbrains.trove4j:trove4j:20160824. Searched in the following locations: http://maven.fabric.io/public/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom http://maven.fabric.io/public/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom https://repo.maven.apache.org/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar https://dl.google.com/dl/android/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.pom https://dl.google.com/dl/android/maven2/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar Required by: project : > com.android.tools.build:gradle:3.0.1 > com.android.tools.build:gradle-core:3.0.1 > com.android.tools.lint:lint:26.0.1 > com.android.tools.lint:lint-c hecks:26.0.1 > com.android.tools.lint:lint-api:26.0.1 > com.android.tools.external.com-intellij:intellij-core:26.0.1

I can't find any help on internet. But I'm still on the tracking.

Any help would be welcome ;]

like image 361
Natan Lotério Avatar asked Jan 17 '18 12:01

Natan Lotério


3 Answers

This happens to me when I open a very old project in gradle 3.1 to solve it I added:

buildscript {
    repositories {
        mavenCentral()
        jcenter()
        google()
    }

To both gradles files (app gradle file and project gradle file)

like image 88
MohammadL Avatar answered Nov 08 '22 09:11

MohammadL


You must replace mavenCentral() with jcenter():

buildscript {
    repositories {
        //mavenCentral()
        jcenter()
        google()
    }
like image 40
ifeegoo Avatar answered Nov 08 '22 11:11

ifeegoo


I resolved this problem by changing the order of repositories

from this:

repositories {
        jcenter()
        google()
    }

to this:

repositories {
            google()
            jcenter()
        }
like image 4
vahid aghakhani Avatar answered Nov 08 '22 11:11

vahid aghakhani