0

Could not find tracker.jar (com.android.tools.analytics-library:tracker:26.1.2). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/analytics-library/tracker/26.1.2/tracker-26.1.2.jar

  • Possible duplicate of [Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0)](https://stackoverflow.com/questions/50563338/could-not-find-runtime-jar-android-arch-lifecycleruntime1-0-0) – zaplec May 28 '18 at 11:01
  • There are a lot of duplicates now, f.e. https://stackoverflow.com/questions/50563297/failed-to-resolve-play-services-flags – MW. May 28 '18 at 11:02
  • Tried all those solutions but it's not working. – Stranger404 May 28 '18 at 11:15
  • Possible duplicate of [Gradle build tool cannot find play-services-tasks.aar? Why?](https://stackoverflow.com/questions/50562212/gradle-build-tool-cannot-find-play-services-tasks-aar-why) – Floern May 28 '18 at 13:23
  • I am also getting this error. I am not able to solve this. I download the jar and added in lib also but that doesn't work. – Harsh Mittal May 28 '18 at 17:03

2 Answers2

2

I have fixed this error Please update your build.gradle of project file like this:

    buildscript {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath 'com.google.gms:google-services:4.0.1'
        classpath 'io.fabric.tools:gradle:1.25.4'
    }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
        maven { url "https://jitpack.io" }
    }
}

Put jcenter() below google().This helps me after 24 hr wasting time in searching for Jar file.

Harsh Mittal
  • 449
  • 3
  • 10
0

I solved this error by add 'mavenCentral' to build.gradle

buildscript {
    repositories {
        google()
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
    }
}

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

task clean(type: Delete) {
    delete rootProject.buildDir
}
lukehuang
  • 1
  • 1