Von der Google Drive Android API migrieren
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Die Drive Android API wurde am 6. Dezember 2018 eingestellt und wird am 1. Februar 2023 vollständig deaktiviert.
Zeitachse
Datum |
Drive Android API-Status |
6. Dezember 2018 |
Die Einstellung wird öffentlich angekündigt. Bestehende Kunden können wie gewohnt auf die API zugreifen, sollten aber sofort mit der Migration beginnen. Neue Kunden dürfen die API nicht verwenden.
|
21. Oktober 2019 |
Die Drive Android API wird nicht mehr im Google Play Services SDK bereitgestellt. Apps können erst dann wieder erstellt werden, wenn die Abhängigkeit von der Drive Android API entfernt wurde. Vorhandene Builds sind davon nicht betroffen. Die öffentliche Dokumentation der Drive Android API ist nicht mehr verfügbar.
|
3. März 2022 |
Die Drive Android API ist eingestellt und alle API-Aufrufe sind nicht funktionsfähig. Kunden müssen bis zu diesem Datum migrieren.
|
1. Februar 2023 |
Die Drive Android API wird vollständig eingestellt und alle Verbindungsversuche schlagen fehl.
|
Drive REST API verwenden
Die Drive REST API bietet dieselben Funktionen wie die Drive Android API, einschließlich der folgenden Möglichkeiten:
Um die Clientmigration zu erleichtern, wird eine Beispiel-App bereitgestellt, in der jeder der oben vorgeschlagenen Ersatz gezeigt wird. Außerdem wird gezeigt, wie Sie mit der REST API Drive-Dateien eines Nutzers erstellen, ändern und abfragen. Bei Problemen können Sie sich auf Stack Overflow das Tag google-drive-api ansehen.
Migration
Da die Drive Android API eingestellt wurde und alle API-Aufrufe nicht mehr funktionieren, muss Ihre App die API nicht mehr aufrufen. Entfernen Sie dazu den Code, mit dem die API initialisiert wird: addApi(Drive.API)
.
Wenn Sie nicht von der Drive Android API migrieren und Ihre App versucht, die API aufzurufen, wird die folgende Fehlermeldung zurückgegeben:
com.google.android.gms.common.api.ApiException: 17: API: Drive.API is not
available on this device. Connection failed with:
ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}
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-04 (UTC).
[null,null,["Zuletzt aktualisiert: 2025-08-04 (UTC)."],[],[],null,["# Migrate from the Google Drive Android API\n\n**The Drive Android API is deprecated as of December 6, 2018 and will be fully\nturned down on February 1, 2023**.\n\nTimeline\n--------\n\n| Date | Drive Android API status |\n|------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| December 6, 2018 | Deprecation is [publicly announced](https://cloud.google.com/blog/products/application-development/sync-google-drive-files-to-apps-using-the-drive-rest-api-bidding-farewell-to-the-drive-android-api). Existing clients will be able to access the API normally, but should immediately commence with migration efforts. New clients must not use the API. |\n| October 21, 2019 | The Drive Android API is removed from the Google Play Services SDK distribution. Apps will be unable to build until removing the Drive Android API dependency, but existing builds will be unaffected. The Drive Android API public documentation will no longer be available. |\n| March 3, 2022 | The Drive Android API is deprecated and all API calls are non-operational. Clients must migrate by this date. |\n| February 1, 2023 | The Drive Android API will be fully turned down and all connection attempts will be unsuccessful. |\n\nUse the Drive REST API\n----------------------\n\nThe Drive REST API offers the same functionality as the Drive Android API,\nincluding ways to:\n\n- Share and collaborate as you expect from Drive. You can [manage permissions or prompt the Share dialog](/workspace/drive/api/guides/manage-sharing) to users as needed. The REST API also allows for commenting on files, allowing your app to interact with the conversation around a file.\n- Search for files using [`files.list`](/workspace/drive/api/v3/reference/files/list), based on traditional indexing or [your own customized, indexable text](/workspace/drive/api/guides/file).\n- Detect changes to files through the [Changes collection](/workspace/drive/api/v3/reference/changes) and to any shared with the user through [shared drives](/workspace/drive/api/guides/enable-shareddrives).\n- Export and convert Google Docs so that your app can easily [open a user's document](/workspace/drive/api/guides/integrate-open#specific).\n\nTo ease client migration efforts, a\n[sample app](https://github.com/googleworkspace/android-samples/tree/master/drive/deprecation) is provided which\ndemonstrates each of the proposed replacements above. It also shows how to\ncreate, modify, and query for a user's Drive files using the REST API. If you\nhave any issues, check out the\n[google-drive-api](https://stackoverflow.com/questions/tagged/google-drive-api?tab=Newest)\ntag on StackOverflow.\n\nMigration\n---------\n\nSince the Drive Android API is deprecated, and all API calls are\nnon-operational, make sure your app is no longer calling the API. To do this,\nremove the code that initializes the API: `addApi(Drive.API)`.\n\nIf you don't migrate from the Drive Android API, and your app attempts to call\nthe API, the following error message is returned:\n\n`com.google.android.gms.common.api.ApiException: 17: API: Drive.API is not\navailable on this device. Connection failed with:\nConnectionResult{statusCode=API_UNAVAILABLE, resolution=null, message=null}`"]]