The code Resources The strategy App Bundle With the Android studio we have option to generate app bundle to publish the app. Based on device configuration app bundle will install only that specific device related resources.
maintains good programming habits. Do not repeat or unused code. Add libs carefully and remove unused libs.
Use proguard to obfuscate the code, it will optimize the unused code, and can reduce the size of the installation package after obfuscation.
The part of native code, in most cases, only needs to support armabi and x86 architecture. If not necessary, consider removing the x86 part.
Use the Lint tool to find unused resources. Remove unused images, strings, XML, etc. Make sure there are no unused files for assets in the assets directory.
When generating the APK, the aapt tool itself will optimize the png, but before that, you can use other tools such as tinypng to further compress and preprocess the image.
jpeg is still png. Choose according to your needs. In some cases, jpeg can reduce the size of the picture. For 9.png images, the stretchable area should be cut as small as possible. In addition, you can avoid using the entire large image when using 9.png stretching to achieve the effect of large images.
provides the image resources of hdpi, xhdpi, xxhdpi selectively. It is recommended to provide xhdpi pictures first. For mdpi, ldpi and xxxhdpi can provide different parts as needed.
Reuse existing image resources as much as possible. For example, you only need to provide a symmetrical picture, and another picture can be implemented by code rotation.
Functions that can be implemented in code, try not to use a lot of pictures. For example, to reduce the use of multiple pictures to make an animation-list AnimationDrawable, this approach provides multiple pictures that take up a lot of space
How do i load image from drawable folder in Jetpack Compose?
What happens next when the device switches between portrait and landscape?
What is the Different Between val and var in Kotlin?
How to stop EditText focus at Activity startup in Android?
How to convert DP to Pixel and Pixel to Dp?
Extract Date and Time from Long Type Variable - RRutors
How to save activity State in Android?
Invoke-customs are only supported starting with android 0 --min-api 26
What is "shared preferences" in Android ?
Permission denied for window type 2010 in Marshmallow device
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
How to Exit android app on back pressed?
How to get an image resource by it's name in android?
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
Hide/Disable soft keyboard on Activity launch: Android
Explain Fragment Life Cycle
How to get screen size (width,height) in Android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What is ANR in android?
How to Get bitmap from drawable: Android
ERR_ACCESS_DENIED in Android Webview with sdk 30
What is Context?
How to start a new activity on button click
Key Points to remember while develop the Android Application.
Open PDF in Google Drive with Intent in Android - RRutors
How to get complete address from latitude and longitude?
Symmetric vs Asymmetric Encryption in Android Server - RRutors
Fix Android Emulator Kill Error When Running Your App
Add Jar/Library Files as Dependency in Android Studio
Fix Behavior Subclass BottomSheetBehavior Exception - RRutors
What is Android?
How to copy database from assets folder in android using kotlin
What is NetworkOnMainThread Exception?
How to Use Deprecated Handler() in Android - RRutors Guide
What is Application?
How to validate email address in Android with Kotlin?
Decompile APK Files: How to Get Source Code - RRutors Guide
How to get a contact image using a phone number in android?
Android Studio project R can't find
How to install/ uninstall apk by command line ADB