경고: Google Play 인스턴트를 더 이상 사용할 수 없습니다. 2025년 12월부터는 Google Play를 통해 인스턴트 앱을 게시할 수 없으며 모든 Google Play 서비스 인스턴트 API가 더 이상 작동하지 않습니다. 사용자에게 더 이상 어떤 메커니즘을 통해서도 Play에서 인스턴트 앱이 제공되지 않습니다.
이 변경사항은 개발자 의견과 Google Play 인스턴트 도입 이후 생태계를 개선하기 위한 Google의 지속적인 투자를 기반으로 이루어집니다.
사용자 증가를 목표로 계속 최적화하려면 개발자가 딥 링크를 사용하여 사용자를 일반 앱 또는 게임으로 안내하는 것이 좋습니다. 이렇게 하면 관련이 있는 경우 사용자를 특정 여정이나 기능으로 리디렉션할 수 있습니다.
Google Play 인스턴트를 사용하면 웹 링크를 한 번 탭하는 것만으로도 다양한 네이티브 환경을 제공할 수 있습니다. 사용자가 앱을 미리 설치하지 않아도 체험해 볼 수 있으므로 더욱 높은 수준의 질 높은 사용자 참여를 촉진할 수 있습니다. 인스턴트 앱이 일반적인 모바일 웹페이지처럼 빠르게 로드되도록 하려면 잘 구조화된 효율적인 인스턴트 앱을 만들어야 합니다. 인스턴트 앱의 바이너리가 작을수록 로드 속도가 빨라지고 사용자 환경이 더 원활해집니다.
이 문서에서는 원활한 인스턴트 앱 환경을 지원할 수 있도록 앱의 구조 및 바이너리 크기를 관리하는 데 지침이 될 수 있는 권장사항을 제공합니다. 이 권장사항을 설치 가능한 앱에 적용해도 도움이 됩니다.
여러 기능 모듈로 리팩터링
앱의 바이너리 크기는 앱을 여러 기능 모듈로 리팩터링할 때 최대로 개선됩니다. 기본 기능 모듈로 시작하여 주제와 관련된 워크플로를 자체 기능 모듈로 추출하세요.
사용자가 모듈의 워크플로를 성공적으로 완료할 수 있도록 각 기능 모듈에 시작 활동과 고유 URL을 할당합니다.
기능 모듈을 만들 때 기본 기능 모듈은 최대한 작게 유지합니다. 특히 앱에서 종속 라이브러리에 액세스해야 하는 부분을 면밀히 살펴보세요. 하나의 기능 모듈에서만 특정 라이브러리를 사용한다면 기본 기능 모듈이 아닌 기능 모듈 자체에서 이 라이브러리를 가져옵니다. 특정 기능 모듈의 인스턴트 앱을 출시하려면 이 기능 모듈과 기본 기능 모듈의 총 크기가 15MB 미만이어야 합니다.
권장사항
앱을 리팩터링할 때 다음 권장사항에 유념하세요.
두 앱 유형에 모두 동일한 코드베이스 사용
설치된 앱과 인스턴트 앱을 둘 다 동일한 모듈식 코드베이스를 사용해 만들면 앱의 프로젝트 관리 프로세스를 단순화할 수 있습니다.
여러 기능 모듈을 위한 설계
앱에 하나의 워크플로만 있고 현재 하나의 기능 모듈만 필요하더라도 여러 기능 모듈을 염두에 두고 설계하는 것이 좋습니다.
이렇게 하면 앱에 기존 모듈을 추가해도 원래 기능 모듈의 크기에 영향을 미치지 않습니다.
처음에는 기능 모듈 크기 한도에 주의를 기울이지 마세요.
기능 모듈 크기 한도는 로컬에서 빌드한 바이너리에는 적용되지 않습니다. 또한 기능 모듈 크기에 15MB 한도를 강제하는 내부 테스트 트랙을 통해 인스턴트 앱을 출시할 수 있습니다. 알파 트랙과 프로덕션 트랙에서만 15MB 한도를 강제합니다.
앱 리소스 업데이트
일부 앱, 특히 코드베이스 기록이 더 긴 앱에는 앱의 바이너리가 더 이상 사용하지 않는 리소스가 포함되어 있습니다. 앱의 모듈을 더 작게 만들 수 있는 방법을 찾고 있다면 다음과 같은 불필요한 코드의 일반적인 원인을 고려하세요.
이미지 파일 크기 줄이기
PNG 대신 WebP 파일 형식을 사용하여 앱의 드로어블 총 크기를 크게 줄일 수 있습니다. Google Play 인스턴트에서는 투명도와 무손실 압축을 포함해 완벽한 WebP 지원을 제공하므로 이미지 품질은 동일하게 유지됩니다.
가능하다면 다른 PNG 이미지 사용을 위한 이전 버전과의 호환성 요구사항을 모두 삭제하세요. PNG 이미지를 사용해야 한다면 앱을 빌드하고 설치하는 데 사용되는 모듈에 이미지를 배치하세요.
사용하지 않는 언어 삭제
앱에서 여러 언어를 지원한다면 현지화된 리소스 수를 최대한 줄이세요. 이 단계는 android.support.v7.appcompat와 같은 'app compat' 라이브러리를 사용할 때 특히 유용합니다.
이 라이브러리에는 여러 언어로 된 메시지가 포함되어 있으며 이 언어 중 일부는 앱에서 지원하지 않을 수 있습니다.
앱에 큰 리소스가 남아 있다면 사용자가 앱과 상호작용하기 시작한 이후 앱에서 리소스의 패키지를 해제하여 독립형 파일로 다운로드할 수 있는지 고려하세요. 이러한 이미지 로드 지연이 발생했을 때는 대개 코드를 변경해야 하지만 사용자가 명시적으로 요청하는 리소스만 다운로드하면 인스턴트 앱의 파일 크기를 크게 줄일 수 있습니다.
사용하지 않는 라이브러리 삭제
앱은 범위가 커지면 많은 수의 종속 항목을 가질 수 있는데, 특히 다음 유형 중 하나입니다.
네이티브 라이브러리: 인스턴트 앱이 실행하지 않는 네이티브 코드를 포함하는 라이브러리입니다.
전이 종속 항목: 앱의 가져온 라이브러리가 종속된 라이브러리입니다.
Android 스튜디오에는 앱의 프로젝트에서 불필요한 종속 항목을 식별하는 데 유용한 도구가 여러 개 있습니다.
외부 라이브러리
Android 스튜디오의 Project 보기에는 External Libraries 섹션이 있습니다.
이 섹션에는 네이티브 코드와 모든 전이 종속 항목을 비롯해 앱에서 사용하는 모든 라이브러리가 포함되어 있습니다. 이 보기에서 앱에 필요 없는 미사용 또는 중복 라이브러리를 찾으세요.
APK Analyzer
APK Analyzer 도구를 사용하여 인스턴트 앱 빌드를 비롯한 여러 빌드를 비교할 수 있습니다.
앱에 필요 없는 라이브러리를 확인한 후 다음과 유사한 행을 Gradle 빌드 파일에 추가하여 제외합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-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-07-27(UTC)"],[],[],null,["# Reduce the size of your instant app\n\n**Warning:** Google Play Instant will no longer be available. Starting December 2025,\nInstant Apps cannot be published through Google Play, and all\n[Google Play services Instant APIs](https://developers.google.com/android/reference/com/google/android/gms/instantapps/package-summary)\nwill no longer work. Users will no longer be served Instant Apps by Play using any\nmechanism.\n\nWe're making this change based on developer feedback and our continuous investments\nto improve the ecosystem since the introduction of Google Play Instant.\n\nTo continue optimizing for user growth, we encourage developers to refer users to\ntheir regular app or game, using [deeplinks](https://support.google.com/googleplay/android-developer/answer/12463044)\nto redirect them to specific journeys or features when relevant.\n\nGoogle Play Instant provides rich, native experiences at the tap of a web\nlink. People can experience your app without upfront installation, enabling a\nhigher level and quality of engagement. To make an instant app load as quickly\nas a typical mobile webpage does, though, you need to create a well-structured,\nefficient instant app. The smaller your instant app's binary, the faster it\nloads and the smoother the user experience is.\n\nThis document conveys best practices for managing your app's structure and\nbinary size to enable a smooth instant app experience. You can apply these same\npractices to benefit your installable app, too.\n\nRefactor into multiple feature modules\n--------------------------------------\n\nThe largest improvement to your app's binary size occurs when you refactor the\napp into multiple feature modules. Start with a [base feature\nmodule](/topic/google-play-instant/getting-started/create-base-feature-module),\nthen extract thematically-related workflows into their own feature modules.\nAssign a starting activity and unique URL to each feature module so that users\ncan complete the module's workflow successfully.\n\nAs you create feature modules, keep the base feature module as small as\npossible. In particular, pay close attention to the parts of your app that\nrequire access to your dependent libraries. If only one feature module uses a\ngiven library, import that library in the feature module itself, not the base\nfeature module. Keep in mind that, in order to release an instant app for a\nparticular feature module, the **total** size of that feature\nmodule and the base feature module must be less than 15 MB.\n| **Note:** If your instant experience contains more methods than the DEX limit of 65,536 methods, you can still [enable multidex](/studio/build/multidex) and publish your instant experience, provided that your app satisfies the total size limit.\n\n### Best practices\n\nWhen refactoring your app, keep the following best practices in mind:\n\nUse the same codebase for both app types\n: You can simplify your app's project management process by using the same\n modular codebase to create **both** your installed app and your instant apps.\n\nDesign for multiple feature modules\n: Even if your app has only one workflow and requires only a single feature\n module for now, it's still a good idea to design for multiple feature modules.\n That way, you can add existing modules to your app without affecting the\n original feature module's size.\n\nDon't focus on the feature module size limit at the beginning\n: Feature module size limits don't apply to locally-built binaries. You can\n also release an instant app through the **internal test** track, which enforces\n a 15 MB limit on feature module sizes. Only the **alpha** and\n **production** tracks enforce the 15 MB limit.\n\nUpdate app resources\n--------------------\n\nSome apps, particularly those that have longer codebase histories, contain\nresources that your app's binaries no longer use. As you look for ways to make\nyour app's modules smaller, consider the following common sources of unneeded\ncode.\n\n### Reduce file size of images\n\nYou can significantly reduce the total size of your app's drawables by using\nthe [WebP](https://blog.chromium.org/2010/09/webp-new-image-format-for-web.html)\nfile format instead of PNG. Google Play Instant provides complete support\nfor WebP, including transparency and lossless compression, so image quality\nremains the same.\n| **Note:** The one exception to this rule is your app's launcher icon: it must use the PNG format. This rule has minimal impact on your app's total size, however, because most projects store launcher icons in the `mipmap` directory.\n\nIf possible, remove all backward compatibility requirements for using other PNG\nimages. If you must use PNG images, place them in the module that's used to\nbuild and install your app.\n| **Note:** You can save even more space by converting your app's images to [vector drawables](/guide/topics/graphics/vector-drawable-resources). Unlike the conversion from PNG to WebP, however, you need to change your app's code to use vector drawables.\n\n### Remove unused languages\n\nIf your app supports multiple languages, reduce as many localized resources as\nyou can. This step is particularly useful to complete if you use an \"app\ncompat\" library, such as [`android.support.v7.appcompat`](/reference/android/support/v7/appcompat/package-summary).\nThis library includes messages in many languages, some of which your app might\nnot support.\n\nTo learn more, check out how to [remove unused alternative\nresources](/studio/build/shrink-code#unused-alt-resources), particularly\nunused languages.\n\n### Remove extra files\n\nYour app might no longer use some of the resources that you've imported into\nyour project. To help remove these resources, Android Studio has a Lint check\nfor this specific situation. To use the tool, complete the following steps:\n\n1. Press **Control+Alt+Shift+I** (**Command+Alt+Shift+I** on Mac OS).\n2. In the dialog that appears, type `\"unused resources\"`.\n3. Select the **Unused resources** option to start the resource usage inspection process.\n\nIf any large resources remain in your app, consider whether it's possible to\nunpackage them from your app and download them as standalone files after the\nuser starts interacting with your app. This sort of image-loading deferral\nusually requires a code change, but it can substantially reduce your instant\napp's file size by downloading only the resources that a user explicitly\nrequests.\n\nRemove unused libraries\n-----------------------\n\nAs an app grows in scope, it can take on a surprising number of dependencies,\nparticularly one of the following types:\n\n- **Native libraries:** Libraries that contain native code that your instant app never runs.\n- **Transitive dependencies:** Libraries upon which your app's imported libraries depend.\n\nAndroid Studio has several useful tools for identifying any extraneous\ndependencies in your app's project:\n\nExternal libraries\n\n: Android Studio's **Project** view includes an **External Libraries** section.\n\n This section contains every library that your app uses, including native\n code and all transitive dependencies. In this view, look for unused or dupicate\n libraries that your app doesn't require.\n\nAPK Analyzer\n\n: You can use the [APK Analyzer](/studio/debug/apk-analyzer) tool to compare\n different builds, including instant app builds.\n\nAfter you've determined which libraries your app doesn't need, exclude them by\nadding lines similar to the following to your Gradle build file:\n\n\\\u003cfeature_module\\\u003e/build.gradle \n\n### Groovy\n\n```groovy\ndependencies {\n implementation('some-important-but-large-library') {\n exclude group: 'com.example.imgtools', module: 'native'\n }\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n implementation('some-important-but-large-library') {\n exclude(group = \"com.example.imgtools\", module = \"native\")\n }\n}\n```\n\nFor more information on reducing the total import size of your app's\ndependencies, see Gradle's guide to [Dependency\nManagement](https://docs.gradle.org/current/userguide/core_dependency_management.html).\n\nImplement cloud delivery of assets\n----------------------------------\n\nIf you need to shrink the size down further, you might need to rely on [cloud delivery of assets](/topic/google-play-instant/getting-started/cloud-delivery-assets)."]]