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
Fix Duplicate Files in APK Build.gradle Issue - RRutors
What is NetworkOnMainThread Exception?
How to validate email address in Android with Kotlin?
How do I check in SQLite whether a table exists?
Android Studio project R can't find
Fix Error: Use JsonReader.setLenient(true) for Malformed JSON
ERR_ACCESS_DENIED in Android Webview with sdk 30
What is Intent? What is the difference between an implicit intent and an explicit intent?
What is the difference between match_parent and fill_parent?
How to install/ uninstall apk by command line ADB
Decompile APK Files: How to Get Source Code - RRutors Guide
What is Android?
What happens next when the device switches between portrait and landscape?
Add Jar/Library Files as Dependency in Android Studio
How to reduce APK package size?
How to save activity State in Android?
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
How to find Android Device UDID or unique ID?
Invoke-customs are only supported starting with android 0 --min-api 26
Extract Date and Time from Long Type Variable - RRutors
INSTALL_FAILED_INVALID_APK: Split lib_slice_9_apk was defined multiple times. It is possible that th
What is ANR in android?
How to get complete address from latitude and longitude?
Explain Fragment Life Cycle
Fix Android Emulator Kill Error When Running Your App
Open PDF in Google Drive with Intent in Android - RRutors
What is "shared preferences" in Android ?
How to get an image resource by it's name in android?
Fix Play Store Rejection Due to SMS Permission - RRutors
How can i comment inside xml file in android studio?
How to convert milli seconds to hours, minutes and seconds in Android?
What is ANR? How to avoid and resolve it?
How to start a new activity on button click
How to get screen size (width,height) in Android?
How do i load image from drawable folder in Jetpack Compose?
How to check Android version?
Hide/Disable soft keyboard on Activity launch: Android
Key Points to remember while develop the Android Application.
Set Activity to Fullscreen Mode in Android - RRutors
How do I generate random numbers in Dart?