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
Key Points to remember while develop the Android Application.
Explain Fragment Life Cycle
How To Set Text Color Programmatically Android TextView?
How to Get bitmap from drawable: Android
FragmentPagerAdapter deprecated, Since API 27.1.0 FragmentPagerAdapter is deprecated.
What happens next when the device switches between portrait and landscape?
Google play store rejected my app due to SMS permission I removed SMS permission from the manifes
How to find Android Device UDID or unique ID?
What is Android Fragments?
How to convert DP to Pixel and Pixel to Dp?
What is the difference between match_parent and fill_parent?
How to copy database from assets folder in android using kotlin
How to extract date and time from Long type variable in Kotlin on Android "
How do i load image from drawable folder in Jetpack Compose?
How can i comment inside xml file in android studio?
How to start a new activity on button click
How to Exit android app on back pressed?
What is NetworkOnMainThread Exception?
How to get screen size (width,height) in Android?
How to convert milli seconds to hours, minutes and seconds in Android?
How do I check in SQLite whether a table exists?
What is Intent? What is the difference between an implicit intent and an explicit intent?
ERR_ACCESS_DENIED in Android Webview with sdk 30
How to stop EditText focus at Activity startup in Android?
Duplicate files during packaging of APK” build.gradle issue: Android Studio
Emulator: emulator: ERROR: Can't find 'Linux version ' string in kernel image file: Andr
How to get a contact image using a phone number in android?
Android Activity FullScreen - How to set activity to fullscreen mode in Android?
How to avoid multiple button click at same time in android?
Android Studio project R can't find
What is ANR in android?
What is Application?
How to add jar/library files as a dependency in Android studio gradle file
'constructor Handler()' is deprecated. Deprecated in Java, How to use Handler() class in And
What is Context?
What is ANR? How to avoid and resolve it?
What are the notifications available in android?
Error: Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 1 path
How to reduce APK package size?
Could not inflate Behavior subclass android.support.design.widget. BottomSheetBehavior How resolve