Zobair Alam
Zobair Alam

Reputation: 527

Does android app bundle and proguard rules do the same optimization?

Is there any difference between proguard rules optimization and app bundle optimization or is it same thing? Can any one explain how they are different?

Upvotes: 3

Views: 1465

Answers (2)

Manohar
Manohar

Reputation: 23394

When you upload app bundle to play store ,the play store will generate a new apk based on the user device , suppose user device is xhdpi , the generated apk by play store will only have xhdpi resources . This will not remove unused code .

Where as the proguard will remove all the unused code while generating the apk . It will not remove alternative resolution resources .

Upvotes: 2

sadat
sadat

Reputation: 4342

The purpose of this process is completely different. An Android app bundle is an alternative application distribution format for Android. This is just like building an apk (older application distribution format).

And Proguard is free Java class file shrinker, optimizer, obfuscator, and preverifier. The purpose of using Progaurd is,

  1. Shrinking – detects and removes unused classes, fields, methods, and attributes.
  2. Optimization – analyzes and optimizes the bytecode of the methods.
  3. Obfuscation – renames the remaining classes, fields, and methods using short meaningless names.

Upvotes: 3

Related Questions