Android (Go 버전)용 개발 권장사항
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Android (Go 버전)용 앱의 개발 또는 최적화를 시작할 때 아래의 권장사항과 일반적인 질문에 대한 답변을 따르세요.
- 앱에 과도한 권한을 추가하지 않습니다.
- 백그라운드에 있을 때와 기기가 저전력으로 실행될 때는 앱 활동을 최소화합니다.
- wake lock을 사용하면 기기가 저전력 상태로 진입하지 못하므로 이 기능의 사용을 피합니다.
- 네트워크 활동을 일괄 처리하여 wakeup 수를 줄입니다. WorkManager를 사용하여 작업을 예약하고 시스템에서 일괄 작업이 실행되도록 할 수 있습니다.
- 더 작은 화면에서 테스트를 실행하여 레이아웃이 축소되는지 확인합니다.
isLowRamDevice()
및 getMemoryClass()
와 같은 메서드는 런타임 시 메모리 제약 조건을 결정하도록 도와줍니다. 이 정보를 사용하여 메모리 사용량을 줄일 수 있습니다. 예를 들어, 메모리 용량이 낮은 기기에서는 더 낮은 해상도의 이미지를 사용할 수 있습니다.
AndroidManifest.xml
파일의 android:installLocation
플래그를 사용하여 앱이 외부 저장소에 설치될 수 있도록 허용합니다.
- 대규모 사용자층을 대상으로 빌드하려는 경우 수십억 사용자를 위한 앱 빌드 문서를 참고하세요.
Go에 맞게 최적화하거나 새로 시작하기
Android Go에서 앱을 출시하려는 많은 개발자는 기존 앱을 최적화하는 것이 좋을지 아니면 완전히 새로운 앱을 개발하는 것이 좋을지 고민합니다. 이러한 선택은 사용 가능한 개발 리소스 수, 기기에 최적화된 앱의 기능을 유지할 수 있는지 여부, 전 세계 최종 사용자를 대상으로 지원할 배포 시나리오 유형 등 다양한 요소에 따라 달라집니다.
- 모두를 위한 하나의 앱
- Android(Go 버전) 기기 및 동일한 환경을 갖는 다른 모든 기기에서 동일한 앱을 사용합니다. 이 경우 기존 앱이 모든 기기에서 올바르게 실행되도록 최적화하게 되고, 기존 사용자는 이러한 최적화의 성능 이점을 얻게 됩니다. 코드를 리팩터링하지 않고도 앱 크기를 크게 절약할 수 있도록 Android App Bundle을 사용할 것을 권장합니다.
- 두 개의 앱
- 새로운 '가벼운' 앱을 만들고 Android(Go 버전) 기기를 타겟팅합니다.
기존 앱은 그대로 두어도 됩니다. '라이트' 앱이 Android(Go 버전) 기기만 타겟팅해야 한다는 요구사항은 없으므로 '라이트' 앱은 계속해서 모든 언어의 모든 기기를 타겟팅할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Best practices for Android (Go edition) development\n\nFollow these best practices and answers to common questions when starting to\ndevelop or optimize your app for Android (Go edition).\n\n- Don't add any excessive permissions to your app.\n- Minimize app activity when in the background and when the device is running on low power.\n- Avoid using wake locks because they prevent the device from going into low-power states.\n- Batch network activity to reduce the number of wakeups. You can use [WorkManager](/topic/libraries/architecture/workmanager) to schedule tasks and let the system batch operations.\n- Validate that your layouts scale down by testing on smaller screens.\n- Methods such as [`isLowRamDevice()`](/reference/android/app/ActivityManager#isLowRamDevice()) and [`getMemoryClass()`](/reference/android/app/ActivityManager#getMemoryClass()) help determine memory constraints at runtime. Using this information, you can scale down your memory use. For example, you can use lower resolution images on low memory devices.\n- Allow your app to be installed to external storage using the [`android:installLocation`](/guide/topics/manifest/manifest-element#install) flag in your `AndroidManifest.xml` file.\n- If you're looking to build for a larger-scaled audience, take a look at the [Build for billions](/topic/billions) documentation.\n\nOptimize for Go or start fresh\n------------------------------\n\nMany developers looking to launch apps on Android Go may wonder if they should\noptimize their existing app or develop an entirely new one. This choice depends\non many factors, including how many development resources you have, whether or\nnot you can keep features in your app that are optimized for these devices,\nand what type of distribution scenarios you want to enable for end-users around\nthe world.\n\nOne app for all\n: Use the same app for Android (Go edition) devices and all other devices with\n an identical experience. In this case, you are optimizing your existing app to\n run well on these devices, and your existing users gain performance benefits\n from those optimizations. We highly encourage you to use the\n [Android App Bundle](/guide/app-bundle) to experience significant size savings\n without having to refactor your code.\n\nTwo apps\n: Create a new \"light\" app and target Android (Go edition) devices.\n You can leave your existing app as is. The \"lite\" app can still target all\n devices in all locales as there is no requirement for this \"lite\" app to only\n target Android (Go edition) devices."]]