Android でのアプリの互換性
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android における「アプリの互換性」とは、アプリが特定のバージョンのプラットフォーム(通常は最新バージョン)で正常に動作することを意味します。Android では、リリースごとにプライバシーとセキュリティを向上させる重要な変更が行われています。また、OS 全体のユーザー エクスペリエンス全般に影響する変更も実装されています。これらの変更がアプリに影響する可能性があるため、各リリース バージョンに含まれる動作変更を確認してテストし、ユーザーに対して互換性アップデートを公開することが重要です。
アプリの互換性が重要である理由
ユーザーは、新しいデバイスを購入した場合や、使用中のデバイスにアップデートをインストールした場合など、Android の最新版にアップデートすると、すぐにアプリの互換性の影響を受けることになります。ユーザーは Android の最新バージョンを楽しみにしており、お気に入りのアプリで Android を体験したいと考えています。アプリが正しく動作しなかった場合、ユーザーとデベロッパーの双方にとって大きな問題となります。
プラットフォームの動作変更の種類
アプリを新しいプラットフォーム バージョンで実行する場合、アプリに影響する変更には次の 2 種類があります。
すべてのアプリ向けの変更
アプリの targetSdkVersion
にかかわらず、そのバージョンの Android で実行されるすべてのアプリに影響する変更です。
新しい Android バージョンのデベロッパー プレビューとベータ版リリース中に、これらの変更に対するアプリの互換性を事前にテストする必要があります。Google Pixel やその他のデバイスの更新は、新しい Android バージョンが Android オープンソース プロジェクト(AOSP)の最新リリースに到達するとすぐに開始されます。そのため、これらのテストを事前に行うことにより、ユーザーが対象デバイスの最新の Android バージョンにシームレスに移行できるようになります。
ターゲット固有の変更
特定の Android バージョンをターゲットとするアプリにのみ影響する変更です。
これらの変更については、最新の安定版 API をターゲットとする際に互換性テストを行う必要があります(現在は Android 16(API レベル 36))。新しいバージョンの Android をすぐにターゲットにする予定がなくても、このような変更に対処するには膨大な開発が必要となる可能性があります。これらの変更については、予備テストを行い、フィードバックを提供できるように、できるだけ早く(理想的には新しい Android バージョンのデベロッパー プレビューとベータ版リリースの間に)把握する必要があります。
互換性フレームワーク ツール
互換性をテストできるように、互換性フレームワークの各リリースには可能な限りの互換性を破る変更が含まれています。互換性フレームワークに変更を含めると、切り替えが可能になり、開発者向けオプションや ADB とは別に変更を強制的に有効または無効にできます。互換性フレームワークを使用する場合、アプリの targetSdkVersion
を変更したり、基本的なテストのためにアプリを再コンパイルする必要はありません。
詳細については、アプリでのプラットフォームの動作変更のテストとデバッグをご覧ください。
非 SDK インターフェースの制限
非 SDK API からデベロッパーを段階的に移行する継続的な取り組みの一環として、各 Android リリースで制限付きの非 SDK インターフェースのリストを更新しています。いつもお伝えしていることですが、フィードバックや公開 API やその他のリクエストがありましたら、ぜひお願いします。
Android の最新リリースの詳細をご確認ください。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-08-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-27 UTC。"],[],[],null,["For Android, the term *app compatibility* means that your app runs properly on a\nspecific version of the platform, typically the latest version. With each\nrelease, we make integral changes that improve privacy and security, and we\nimplement changes that evolve the overall user experience across the OS.\nSometimes these changes can affect your apps, so it's important to take a look\nat the behavior changes that are included in each released version, test against\nthem, and publish compatibility updates for your users.\n\nWhy app compatibility is important\n\nApp compatibility starts to affect your users immediately when they update to\nthe latest version of Android, whether they've purchased a new device or\ninstalled an update on their current device. They're excited to explore the\nlatest version of Android, and they want to experience it with their favorite\napps. If their apps don't work properly, it can cause major issues both for them\nand for you.\n\nTypes of platform behavior changes\n\nYour app can be affected by two different types of changes when running on a new\nplatform version:\n\nChanges for all apps\n\nThese changes affect all apps that run on that version of Android, regardless of\nan app's `targetSdkVersion`.\n\nYou should test your app's compatibility with these changes proactively during\nthe developer preview and beta releases of each new Android version. Updates to\nPixel and other devices start as soon as a new Android version reaches its final\nrelease to [Android Open Source Project (AOSP)](https://source.android.com/), so when you test proactively\nfor these changes, you help ensure that your users can seamlessly transition to\nthe latest Android version on these devices.\n\nTargeted changes\n\nThese changes only affect apps that are targeting that version of Android.\n\nFor these changes, you should perform compatibility testing as you prepare to\n[target the latest stable API version](/distribute/best-practices/develop/target-sdk), which is\nAndroid 16 (API level 36). Even if you aren't planning to target a new\nAndroid version immediately, addressing these changes can require a significant\namount of development. You should learn about these changes as early as\npossible---ideally during the developer preview and beta releases of each new\nAndroid version---so you can do preliminary testing and provide feedback.\n\nCompatibility framework tools\n\nTo help you test for compatibility, we include as many of the breaking changes\nas possible each release in the compatibility framework. Including a change in\nthe compatibility framework makes it toggleable, letting you force-enable or\ndisable the changes individually from developer options or ADB. When using the\ncompatibility framework, you don't need to change your app's `targetSdkVersion`\nor recompile your app for basic testing.\n\nTo learn more, see [Test and debug platform behavior changes in your app](/guide/app-compatibility/test-debug).\n\nRestrictions on non-SDK interfaces\n\nAs part of our ongoing effort to gradually move developers away from non-SDK\nAPIs, we update the [lists of restricted non-SDK interfaces](/guide/app-compatibility/restrictions-non-sdk-interfaces) in each Android\nrelease. As always, your feedback and [requests for public API equivalents](/guide/app-compatibility/restrictions-non-sdk-interfaces#feature-request)\nare welcome.\n\nPlatform releases\n\nLearn more about the latest Android releases:\n\n- [Android 15 (API level 35)](/about/versions/15)\n- [Android 14 (API level 34)](/about/versions/14)\n- [Android 13 (API level 33)](/about/versions/13)\n- [Android 12 (API levels 31, 32)](/about/versions/12)\n- [Android 11 (API level 30)](/about/versions/11)"]]