Feed Buzzard
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact
No Result
View All Result
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact
No Result
View All Result
Feed Buzzard
No Result
View All Result
Home World Tech

How to reduce App (.apk) Size –

Gordon James by Gordon James
January 7, 2021
in World Tech
0
0
SHARES
42
VIEWS
Share on FacebookShare on Twitter

Development issue/problem:

Help! Help!

When I install my application on my phone to test it, it displays a size of 11.35 MB. It is a very simple application that allows the user to visualize interesting facts. The only reason I can think of is that there are 14 JPEG files in the drawings that serve as background images for fun facts. The average size is about 500KB.

I want to reduce the size of my application so as not to consume valuable resources on the user’s device. In addition, how to get rid of the images, is it possible to optimize the size of the apk file?

EDIT: The pictures were taken by myself with the android phone.

How can I solve this problem?

Solution 1:

I advise you to compress your .jpg files as much as possible, which should greatly reduce the size of your .apk file. A free tool like Paint.NET can help you with this. It offers great rearrangement possibilities.

Solution 2:

Other responses mention image reduction. You can also try ProGuard to lower your byte code. Here is an article about applying ProGuard to an Android application.

Solution 3:

Make sure that your jpg files are not saved with a higher resolution than necessary. A good Android phone has a screen resolution of 1920×1200 or 2560×1440 (around 2015) 800 x 480. So your background may not have more pixels than that (unless your application supports some kind of zoom). Also: Are there any background photos? If this is not the case, you can further reduce the file size by using a vector image format (e.g. svg) or a dynamic palette format (e.g. gif).

Solution 4:

FIXED

With the introduction of the 23.2 support library, you can now replace many of your images with SVG images (with or without animations) to further reduce the size of the apk.

ORIGINAL

This may be a late reaction, but it may be useful for future users.

Follow this link.
To summarize the page, here are the main points to reduce the size of the apk in general:

  • With the help of ProGaurd
  • Delete all debugging information present in the application (statements such as Log.i(()). They can be conditioned in a state that is only activated when the application is tested.
  • Use recommended media formats
    • Photo: PNG or JPG
    • Audio: AAFC
    • Video: H264 STRAW
  • Image compression with OptiPNG or PNGCrush
  • Use 9patch to scale the images
  • With this tool you can find and delete unused resources.
  • Avoid using multiple sources to get the same functionality. The resources are not limited to images, but also extend to APIs. Sometimes a single API can give multiple results instead of using two or three different APIs. Duplicates and goods are also a waste of space.

Solution No 5:

Converting to WebP, significantly reducing the size of the application

He reduced the size of my application from 40 MB to 25 MB.

Steps:

  • Right click on res
  • Convert to WebP

What he does: It reduces the png format to WebP format. Moreover, the quality is not destroyed.

Solution No 6:

Besides optimizing the images, I also found it useful to look at the support libraries used. I have a relatively simple application that focuses on platforms with an API >=10, but despite this, my APK has increased by 2.2 million, or 1.4 million after using ProGuard. When I looked in the MOT, the code was 1.5M and there were a lot of extra resources (abc_*) I didn’t know about.

Then I found this: https://developer.android.com/tools/support-library/features.html

It turns out I don’t need appcompat-v7, only v4 support, and this change in my dependencies has reduced the MOT size to 1.7M (0.9M with ProGuard).
It is understandable that support libraries contain a lot of unnecessary code and resources, so it can be useful to use only the ones you need.

(Although -0.5M is not relevant for a request for 11M, I’m publishing it here because I was looking for a solution on this page…).

Solution No 7:

  • Use tinypng to compress the
    png or jpg image file format of your project, this can greatly reduce the size of the
    image without loss of image quality;.
  • Some images use a tinypng compression that can distort, you can convert
    these images to WebP format, use 智 图 or
    iSparta can convert other formats to WebP ;
  • Use the plush, make sure no fluids are used and remove it;

Solution No 8:

In addition to the size of the image file, different algorithms can have a significant influence on the final size. I found Yahoo’s www.smushit.com much more efficient (at least for .png’s) than the compressors and codecs I currently have on my computer.

Solution No 9:

Four ways and the size of your application will increase from 11.35 MB to about 5 MB.
First check the application components using the App Analyzer (a built-in feature of Android Studio), click the Build button at the top of the page and then click Analyze MOT. It shows you all the components the apk uses.

  1. Security enabled
  2. Activate ShrinkResource
  3. resConfigs (call it as if your application is in only one language, e.g. English, and then just specify resConfigs as).
  4. Convert all images from .png or .jpg to Webp (the most important).

The steps to get there.

1 & 2. For Proguard and ShrinkResource

In degrees, just add

release {
minifyEnabled true
proguardFiles getDefaultProguardFile (‘proguard-android.txt’), ‘proguard-rules.pro’
shrinkResources true
}.

  1. For resConfigs

standardConfig {
applicationId com.goparties.gpuser
minSdkVersion 19
targetSdkVersion 27
resConfigs and

}

  1. To convert all images from .png or .jpg to Webp

A very simple process: Just right-click on the drawing area (drawable, drawable-hdpi, drawable-xhdpi, etc.) and click convertToWebP (the latter option).

The Min SDK version must be 18 years old.

Let’s go, let’s go, let’s go, let’s go, let’s go: Now analyze the size of your application.

Bingo! !!!!!

Solution No 10:

There are two things I can point out from experience.

  1. If you use eclipse to create an apk file, the sources are duplicated (as was the case in my case), you can try creating an apk with ant and build.xml and compare the size.
  2. Also check for overlapping agents in the field. Link to this site here.

Good luck!

Related Tags:

reduce apk size react native,android app size limit 2020,reduce app size ios,enable proguard/r8,apk analyzer android studio,how to reduce app display size in android,how to reduce apk size in flutter,enable proguard r8,reduce apk size flutter,reduce apk size unity,reduce apk size online,enable proguard/r8 android,splitting apk in android,app size reducer app,compress file to apk,ionic 4 app size is too large,size reducer apk,android minifyenabled,android studio hacks,what is room database?,visiblefortesting android,how to reduce dex file size,what is not a good way to reuse android code,how to reduce app size in android phone,reduce react native app size android,android is developed by,file compressor apk for pc,apk to zip online,zipalign not compressing,large file compressor online,word file compressor apk,how to reduce build size in android studio,app size android,reduce nativescript app size,how to reduce app size in kotlin

Total
0
Shares
Share 0
Tweet 0
Pin it 0
Share 0
Gordon James

Gordon James

James Gordon is a content manager for the website Feedbuzzard. He loves spending time in nature, and his favorite pastime is watching dogs play. He also enjoys watching sunsets, as the colors are always so soothing to him. James loves learning about new technology, and he is excited to be working on a website that covers this topic.

Related Posts

Blockchain Conference in Poland Showcases New Solutions to Problems in Enterprise Logistics
World Tech

Blockchain Conference in Poland Showcases New Solutions to Problems in Enterprise Logistics

December 15, 2022
World Tech

Rockstar Games Brings GTA to The Metaverse

October 20, 2022
World Tech

Ways Technology Is Changing The World Of Education

September 21, 2022
Next Post

How to clone or extend screen in Windows 10

NoClassDefFoundError at Google Play Services V2 library –

Devices with Android + MIUI and setCustomSelectionActionModeCallback –

No Result
View All Result

Recommended

Myths and Misconceptions About Joint Pain

Myths and Misconceptions About Joint Pain

6 hours ago
The Spider Veins Facts that Every Individual Ought to Know

The Spider Veins Facts that Every Individual Ought to Know

6 hours ago

5 Benefits of Telehealth That You Should Understand

16 hours ago
openai gpt3 dallmiddotdouglas mit technologyreview

Why GPT-3 is so Impressive – and Why it’s Also Worrying

24 hours ago

Categories

  • Fitness Trackers
  • General
  • Latest
  • Pokemon
  • Tech
  • Technology and Computing
  • Wearable Tech
  • World Tech
  • World Tech Code

Recent Posts

  • Myths and Misconceptions About Joint Pain January 30, 2023
  • The Spider Veins Facts that Every Individual Ought to Know January 30, 2023
  • 5 Benefits of Telehealth That You Should Understand January 30, 2023
  • Why GPT-3 is so Impressive – and Why it’s Also Worrying January 29, 2023

Categories

  • Fitness Trackers
  • General
  • Latest
  • Pokemon
  • Tech
  • Technology and Computing
  • Wearable Tech
  • World Tech
  • World Tech Code

© 2022 FeedBuzzard.com

No Result
View All Result
  • General
  • Tech
  • World Tech
  • World Tech Code
  • Wearable Tech
  • Pokemon
  • About Us
    • Terms & Conditions
    • Privacy Policy
  • Contact

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT