[[["易于理解","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"]],["最后更新时间 (UTC):2023-09-19。"],[],[],null,["# Install Defold and configure projects for Android\n\nThis guide covers the following steps:\n\n- Selecting a version of Defold\n- Downloading and installing Defold\n- Creating a new project using the mobile template\n- Configuring Android specific Defold project settings\n\nSelect a version\n----------------\n\nUse the latest stable release of Defold when possible. For Android development,\nuse version 1.2.181 or higher.\n| **Note:** Starting in August 2021, Google Play will require all Android apps to be submitted as Android App Bundles, and to use a target API level of 30 or higher. Defold 1.2.181 or higher meets these requirements. For more information, see the [Target API Level](/distribute/best-practices/develop/target-sdk) page.\n\nDownload and run Defold\n-----------------------\n\nVisit the [Defold download page](https://defold.com/download/)\nto download the game engine for your preferred environment.\n\nDefold is distributed as a standalone application. It does not require an installation process; after extracting the download archive, you can run it as-is.\n\nCreate a project using the mobile game template\n-----------------------------------------------\n\nDefold includes a variety of templates you can use when creating a new project.\nThe **Mobile Game** template is useful when making a project for Android.\nChoosing this template automatically creates placeholder application icon files,\nand configures size settings, orientation settings, and\n[input bindings](https://defold.com/manuals/input/#setting-up-input-bindings).\n\nTo create a new project using the Mobile Game template, do the following:\n\n1. Launch the [Defold editor](https://defold.com/manuals/editor/).\n2. Click **New Project** , and make sure the **From Template** tab is selected.\n3. Choose the **Mobile Game** template from the list.\n4. Specify a name and location for the new project.\n5. Click **Create New Project**.\n\n**Figure 1.** Selecting the **Mobile Game** template when creating a new project\n\nConfigure projects for Android\n------------------------------\n\nDefold supports a number of Android-specific settings for a Defold project.\n\n- To access these settings: in the Defold editor, open the `game.project` file and scroll down to the **Android** section.\n\n**Figure 2.** Project settings for a Defold project\n\nImportant Android specific project settings group into the following categories:\n\n### Application icons\n\n**App icon** fields: Specify the application icon files. Icon files must be in\nPNG format and match the pixel size denoted in the field name.\n\n### Package information\n\n**Version Code**: Specify the package version code. Google Play requires a\nunique version code for each package submission. Attempting to use a version\ncode that is lower than a previously submitted version code results in an error.\n\n**Minimum Sdk Version**: Define the minimum Android API level supported by your\nproject.\n\n**Target Sdk Version** : Define the API level of the Android SDK used to build\nand export the project. Ensure this value is compliant with\nGoogle Play [target API requirements](/distribute/best-practices/develop/target-sdk).\n\n**Package**: Specify the package identifier of the application. This should match\nthe package identifier created in the Google Play Console.\n\n**Manifest setting** : Specify the `AndroidManifest.xml` file that will be used\nto create the application manifest. Defold automatically generates a default\nmanifest file for this setting and populates it with values from the project settings.\n\n### Other settings\n\n**Immersive Mode**: If selected, this option hides the navigation and status bars\nwhen the application is active.\n\n**Debuggable** : If selected, this option sets the `android:debuggable` field in the\nAndroid manifest during export.\n\nAdditional resources\n--------------------\n\n- [Defold manual - Android development](https://defold.com/manuals/android/)\n- [Defold manual - Project settings](https://defold.com/manuals/project-settings)"]]