Version: 2023.2
언어: 한국어
Android 빌드 설정
Export an Android project

Build your application for Android

This page contains instructions on how to build your Unity application for Android and considerations to be aware of when you do. For information on the build process for Android and the tools Unity uses, refer to How Unity builds Android applications.

Instead of building your application, you can also export the Unity project as a Gradle project and import that into Android Studio. This is useful if you want more control over the build pipeline, want to see or modify the Android App Manifest that Unity generates for your application, or integrate Unity-powered features into another Android application. For more information, refer to Exporting an Android project.

Some digital distribution services that host Android applications have particular requirements that can change the build process. For example, Google Play requires your application to be an Android App Bundle (AAB) and not an APK. If you are targeting a specific digital distribution service with your build, refer to the documentation for that Digital distribution service first to check if the requirements differ.

Some digital distribution services have a limit on the initial install size of your application. Unity includes multiple methods that you can use to optimize the install size. For more information, refer to Optimize distribution size.

If you want to build your application for debugging purposes, application patching can help you reduce the time it takes to build your application. For more information, refer to Application patching.

Configure the build

빌드를 생성하기 전에 Unity가 런타임 설정으로 애플리케이션을 빌드하도록 프로젝트를 설정하고 원하는 시스템 프로퍼티를 빌드합니다. 다음과 같이 Unity 빌드를 구성하는 두 가지 설정 세트가 있습니다.

퍼블리싱 포맷

Unity는 다음의 퍼블리싱 포맷으로 Android 애플리케이션을 빌드할 수 있습니다.

기본적으로 Unity는 APK 퍼블리싱 포맷으로 Android 애플리케이션을 빌드합니다. Unity가 Android 애플리케이션을 AAB로 빌드하게 하려면 다음 단계를 따르십시오.

  1. File > Build Settings를 선택합니다.
  2. Platform 창의 플랫폼 리스트에서 Android를 선택합니다.
  3. Build App Bundle (Google Play)을 활성화합니다. 프로젝트를 익스포트하여 Android Studio에서 빌드하고자 하는 경우 Export Project를 활성화한 다음 Export for App Bundle을 활성화합니다.

Build the application

Android용 Unity 애플리케이션을 빌드하려면 다음 단계를 따르십시오.

  1. File > Build Settings를 선택합니다.
  2. From the list of platforms in the Platform pane, select Android.
    Note: If Android is greyed out, set up your project for Android development.
  3. Disable Export Project. If you want to export your project for Android Studio instead of building it within Unity, refer to Exporting your Android project.
  4. If you want to use the Build and Run option to immediately run the build on a target device, set Run Device to the device you want to run the application on. For information on how to connect your target device to Unity, refer to Debugging on an Android device or Debugging on a ChromeOS device, depending on the platform you want to build for.
  5. Click either Build or Build and Run.
  6. Select the destination for Unity to place the application. If you selected Build and Run, Unity also installs the application on the Run Device.
  7. Click Save. This starts the build.

Build and Run을 선택한 경우 Unity가 빌드를 생성할 때 다음을 수행합니다.

  • Split Application Binary 플레이어 설정이 활성화되고 Build App Bundle (Google Play) 빌드 설정이 비활성화되는 경우 Unity는 APK에 대한 Android 확장 파일 (OBB)을 빌드하여 기기의 올바른 위치에 배치합니다.
  • Development Build 빌드 설정이 활성화되는 경우 Unity는 애플리케이션을 실행하기 전에 프로파일러 터널을 설정하고 CheckJNI를 활성화합니다.

: 출력 경로를 처음 지정한 후 Ctrl+B (macOS: Cmd+B) 키보드 단축키를 사용하여 애플리케이션을 빌드하고 실행할 수 있습니다.

Application signing

Android applications must be digitally signed to run on an Android device. There are two types of application signing:

  • Debug signing: The default signing method for a new Unity Project. Applications that use debug signing are able to run on an Android device, but you can’t publish them.
  • Custom signing: The signing method that Gradle uses when you provide custom signing information. Applications that use custom signing are able to run on an Android device and you can publish them.

To provide custom signing information, create a keystore and load it into Publishing Settings.

When you provide custom signing information, Unity doesn’t store keystores and key passwords on disk for security reasons. This means that you need to re-enter key passwords each time you restart the Unity Editor. If you don’t provide the passwords and attempt to build the application, the build process fails. To avoid entering passwords each time you open the Unity Editor, it’s best practice to only provide custom signing information when you want to build the application to publish. To create a build for testing on a device, don’t provide custom signing information and use debug signing instead.

For more information about application signing, refer to Sign your app.


对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Android 빌드 설정
Export an Android project
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961