Plugin [id: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'] was not found in any of the following sources:

Viewed 675

Plugin [id: 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'] was not found in any of the following sources:

  • Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights.

'''

plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
    id 'kotlin-parcelize'

}

'''

2 Answers

The question is missing some information. I will suggest following the guide below step by step. https://developers.google.com/maps/documentation/android-sdk/secrets-gradle-plugin

The two things that come in to mind at first glance are?

  1. Specify the version of the plugin
plugins {
    id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1'

}
  1. Add the following at the top of your settings.gradle or settings.gradle.kts.
pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

rootProject.name = ...

It looks like in your root build.gradle you're missing a:

buildscript {
    dependencies {
        classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:2.0.1"
    }
}

as explained in the instructions here: https://github.com/google/secrets-gradle-plugin

Related