[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Configure install-time delivery\n\nFeature modules allow you to separate certain features and resources\nfrom the base module of your app and include them in your app bundle. You can\nthen [customize delivery options](/guide/playcore/feature-delivery#customize_delivery)\nto control when and how devices running Android 5.0 (API level 21) or higher\ndownload your app's features.\n\nKeep in mind, this type of modularization requires more effort and possibly\nrefactoring your app's existing code, so consider carefully which of your\napp's features would benefit the most from being available to users on demand.\n\nIf you want to gradually modularize app features over time, without\nchanging the behavior of your app or customizing advanced delivery options, you\ncan do so by creating feature modules that are configured for install-time\ndelivery. That is, you can modularize a feature as a feature module, but not\nenable advanced options so the feature is available when a user installs your\napp.\n\nAdditionally, feature modules that are configured for install-time delivery have the option to later be uninstalled if they're no longer required. For that, they need to be [set up as removable](#make-removable).\n\nThis section describes how to create a feature module for install-time\ndelivery. Before you begin, make sure you're\nusing [Android Studio 3.5](/studio) or higher and Android Gradle Plugin 3.5.0\nor higher.\n\nConfigure a new module for install-time delivery\n------------------------------------------------\n\nThe easiest way to create a new feature module is by using\n[Android Studio 3.5](/studio) or higher.\nBecause feature modules have an\ninherent dependency on the base app module, you can add them only to existing\napp projects.\n\nTo add a feature module to your app project using Android Studio,\nproceed as follows:\n\n1. If you haven't already done so, open your app project in the IDE.\n2. Select **File \\\u003e New \\\u003e New Module** from the menu bar.\n3. In the **Create New Module** dialog, select **Dynamic Feature Module** and click **Next**.\n4. In the **Configure your new module** section, complete the following:\n 1. Select the **Base application module** for your app project from the dropdown menu.\n 2. Specify a **Module name** . The IDE uses this name to identify the module as a Gradle subproject in your [Gradle settings file](/studio/build#settings-file). When you build your app bundle, Gradle uses the last element of the subproject name to inject the `\u003cmanifest split\u003e` attribute in the [feature module's manifest](/guide/app-bundle/dynamic-delivery#dynamic_feature_manifest).\n 3. Specify the module's **package name**. By default, Android Studio suggests a package name that combines the root package name of the base module and the module name you specified in the previous step.\n 4. Select the **Minimum API level** you want the module to support. This value should match that of the base module.\n5. Click **Next**.\n6. In the **Module Download Options** section, complete the following:\n\n 1. Specify the **Module title** using up to 50 characters. Your app's base\n module must include the module title as a\n [string resource](/guide/topics/resources/string-resource), which you\n can translate. When creating the module using Android Studio, the IDE\n adds the string resource to the base module for you and injects the\n following entry in the feature module's manifest:\n\n \u003cdist:module\n ...\n dist:title=\"@string/feature_title\"\u003e\n \u003c/dist:module\u003e\n\n | **Note:** If you enable resource shrinking, such as for your release builds, the shrinker might remove the module title string resource if code in your base module does not reference it. To make sure the string resource remains in the build output, include the resource in a [custom resource keep file](/studio/build/shrink-code#keep-resources).\n 2. In the dropdown menu under **Install-time inclusion** , select **Include\n module at install-time**. Android Studio injects the following in the\n module's manifest to reflect your choice:\n\n \u003cdist:module ... \u003e\n \u003cdist:delivery\u003e\n \u003cdist:install-time /\u003e\n \u003c/dist:delivery\u003e\n \u003c/dist:module\u003e\n\n If you want to learn how to create a feature module\n that you can download after app install, read\n [configure on-demand delivery](/studio/projects/dynamic-delivery/on-demand-delivery).\n 3. Check the box next to **Fusing** if you want this module to be available\n to devices running Android 4.4 (API level 20) and lower and included in\n multi-APKs. That means you can omit it from devices that don't support\n downloading and installing split APKs. Android Studio injects the\n following in the module's manifest to reflect your choice:\n\n \u003cdist:module ...\u003e\n \u003cdist:fusing dist:include=\"true | false\" /\u003e\n \u003c/dist:module\u003e\n\n7. Click **Finish**.\n\nAfter Android Studio finishes creating your module, inspect its contents\nyourself from the **Project** pane (select **View \\\u003e Tool Windows \\\u003e Project**\nfrom the menu bar). The default code, resources, and organization should be\nsimilar to those of the standard app module.\n\nMake an install-time module removable\n-------------------------------------\n\nIt might be useful to create feature modules for install-time delivery that have the option to be later uninstalled if no longer required. For example, to reduce the installed size of\nyour app, you can modularize content that's required for training or onboarding,\nand then\n[uninstall the feature module](/guide/playcore/feature-delivery/on-demand#uninstall_modules) using the Play Core API\nafter the user is set up to use your app.\n\nInstall-time modules are not removable by default. To mark a module as removable and allow it to be uninstalled, add the `removable` tag and set its value to `true`: \n\n \u003cdist:module ... \u003e\n \u003cdist:delivery\u003e\n \u003cdist:install-time\u003e\n \u003cdist:removable dist:value=\"true\"/\u003e\n \u003c/dist:install-time\u003e\n \u003c/dist:delivery\u003e\n \u003c/dist:module\u003e\n\n| **Note:** Configuring too many install-time modules as removable might increase the download and install time for your app. To avoid this issue, keep the number of removable install-time delivery modules under 10."]]