Plugin id: 'com.google.firebase.firebase-perf was not found in any of the following sources

264 Views Asked by At

I am trying to implement network logging via firebase.

I have followed the steps here, however I am getting the following error when syncing gradle:

* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.google.firebase.firebase-perf', version: '1.4.2', apply: false] was not found in any of the following sources:

Here is a partial of my top level/project gradle.build file:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.3.1'
        classpath 'com.google.gms:google-services:4.3.15'
        classpath 'com.google.android.gms:oss-licenses-plugin:0.10.6'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
        classpath "com.squareup:javapoet:1.13.0"
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.6'
        classpath 'org.jacoco:org.jacoco.core:0.8.8'
        classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.5.0.2730"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

plugins {
    id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
    id 'com.google.firebase.firebase-perf' version '1.4.2' apply false <-- this is the line causing the issue
}

Here is a partial from my module-app gradle.build:

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'com.google.android.gms.oss-licenses-plugin'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-parcelize'
apply plugin: 'kotlin-kapt'

...........................
...........................
...........................

  //Analytics
    implementation platform('com.google.firebase:firebase-bom:32.4.0')
    implementation 'com.google.firebase:firebase-crashlytics-ktx'
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'com.google.firebase:firebase-perf-ktx'

The steps are pretty simple, I don't know where I have gone wrong or what could be. A similar questions was asked here however there is no helpful info there.

I would really appreciate if there is anyone whom has experienced something similar could shed some light, of if you haven't, perhaps you could shed some light.

Thanks

1

There are 1 best solutions below

0
On

Just in case anyone comes across this issue. I figured out the problem.

A really simple fix and a really silly mistake. I was running Charles Proxy at the time and charles was interfering with the network, which was affecting gradle.