Bibliotheksversionen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Ab Version 15.0.0 werden die Google Play-Dienste-Bibliotheken einzeln verwaltet. So können die Entwicklungsteams für jede Bibliothek Fehlerkorrekturen und Verbesserungen unabhängig voneinander und schneller bereitstellen. Sie können die neuesten Releases für die Google Play-Dienste und Firebase verfolgen.
Strikter Versionsabgleich
Eine Version einer Bibliothek ist möglicherweise nicht mit einer bestimmten Version einer anderen Bibliothek kompatibel. Um diese Situation zu bewältigen, bieten mehrere Gradle-Plug-ins Unterstützung bei diesen Versionsabweichungen. Die Logik in diesen Plug-ins ähnelt der Logik in einer failOnVersionConflict()
-Regel für ein ResolutionStrategy
, das mit Google Play-Diensten und Firebase-Abhängigkeiten verknüpft ist.
Plug-in für Google-Dienste
Das Gradle-Plug-in für Google-Dienste prüft, ob kompatible Versionen von Google Play-Diensten und Firebase-Bibliotheken vorhanden sind.
Eigenständiges Plug-in für den Versionsabgleich
Wenn Sie das Google Services-Plug-in nicht verwenden, aber trotzdem eine strenge Versionsprüfung Ihrer Abhängigkeiten wünschen, können Sie das strict-version-matcher-plugin
anwenden. Sie können den Code dieses Plug-ins auf GitHub ansehen.
Das folgende Code-Snippet zeigt, wie Sie das Gradle-Plug-in hinzufügen:
Kotlin DSL
build.gradle.kts
plugins {
id("com.google.android.gms.strict-version-matcher-plugin")
}
Groovy-DSL
build.gradle
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
Wenn Sie dieses Plug-in verwenden möchten, müssen Sie auch Folgendes zu Ihrem Buildscript-Classpath hinzufügen, das Sie aus dem Maven-Repository von Google erhalten:
Kotlin DSL
build.gradle.kts
classpath("com.google.android.gms:strict-version-matcher-plugin:1.2.4")
Groovy-DSL
build.gradle
classpath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2025-08-17 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-17 (UTC)."],[[["\u003cp\u003eGoogle Play services libraries are now individually maintained, allowing for faster and more frequent updates to individual components.\u003c/p\u003e\n"],["\u003cp\u003eStrict version matching is crucial as library versions might be incompatible, and the Google Services Gradle plugin and the standalone strict-version-matcher-plugin help manage these dependencies.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003estrict-version-matcher-plugin\u003c/code\u003e offers a way to ensure version compatibility for Google Play services and Firebase dependencies, even without using the Google Services plugin.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize the standalone plugin, you need to add it to your buildscript classpath and apply it in your Gradle file using the provided code snippets.\u003c/p\u003e\n"]]],["Google Play services libraries are individually maintained, enabling faster updates. To manage potential version incompatibilities between libraries, Gradle plugins provide guidance. The Google Services Gradle plugin checks for compatible versions of Google Play services and Firebase libraries. Alternatively, the `strict-version-matcher-plugin` offers dependency version checking without the Google Services plugin. To use it you must add the plugin and the `strict-version-matcher-plugin` classpath to your build script.\n"],null,["As of version 15.0.0, the Google Play services libraries are maintained\nindividually, allowing the development teams for each library to ship fixes and\nenhancements independently and more quickly. You can track the latest releases\nfor [Google Play services](/android/guides/releases) and [Firebase](https://firebase.google.com/support/release-notes/android).\n\nStrict version matching\n\nA version of one library might be incompatible with a specific version of\nanother library. To help handle this situation, several Gradle plugins provide\nguidance for these version mismatches. The logic in these plugins is similar to\nthe logic in a `failOnVersionConflict()` rule for a [`ResolutionStrategy`](https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.ResolutionStrategy.html)\nthat's associated with Google Play services and Firebase dependencies.\n\nGoogle services plugin\n\nThe [Google Services Gradle plugin](/android/guides/google-services-plugin) checks for compatible versions of Google\nPlay services and Firebase libraries.\n\nStandalone version matcher plugin\n\nIf you're not using the Google Services plugin, but you still want strict\nversion checking of your dependencies, you can apply the\n`strict-version-matcher-plugin`. You can view this [plugin's\ncode](https://github.com/google/play-services-plugins/tree/master/strict-version-matcher-plugin) on GitHub.\n\nThe following code snippet shows how to add the Gradle plugin: \n\nKotlin DSL\n\nbuild.gradle.kts \n\n```kotlin\nplugins {\n id(\"com.google.android.gms.strict-version-matcher-plugin\")\n}\n```\n\nGroovy DSL\n\nbuild.gradle \n\n```groovy\napply plugin: 'com.google.android.gms.strict-version-matcher-plugin'\n```\n\nTo use this plugin, you also need to add the following to your buildscript\nclasspath, obtained from [Google's Maven repository](https://maven.google.com/web/index.html#com.google.android.gms:strict-version-matcher-plugin): \n\nKotlin DSL\n\nbuild.gradle.kts \n\n```kotlin\nclasspath(\"com.google.android.gms:strict-version-matcher-plugin:1.2.4\")\n```\n\nGroovy DSL\n\nbuild.gradle \n\n```groovy\nclasspath 'com.google.android.gms:strict-version-matcher-plugin:1.2.4'\n```"]]