This isn't a general gripe about the bloat of Android apps nowadays*, but a very specific question:
If you install Android Studio 2.3.3 and create the "Hello world" sample app (as described in the Building your first app official tutorial), then build a release APK, the resulting file is 825KB (I tested this on Linux, but I suspect the output is the same on other OSes).
I've already enabled ProGuard and there are no images or other resources.
What goes in that APK by default?
Why?
How can that bloat be taken out?
By comparison, in 2013 a Hello World app was under 10Kb.
* I remember when decent fully-functional apps were a few hundred KBs, and by comparison a PWA like Uber is 1% the size of the corresponding Android app
Exclude all AppCompat libraries and you will see size decrease to about 100kb.
appcompat v7 is automatically attached even if you do not use it at all
In your build.gradle, exclude from "dependencies": compile 'com.android.support:appcompat-v7:26.+
You'll also have to edit res\values\styles.xml
to become only this:
<resources><style name="AppTheme" parent="android:Theme.Light"></style></resources>
(make sure to remove the <!-- Customize your theme here. -->
lines). Also, in MainActivity.java
, change the extends AppCompatActivity
part to
public class MainActivity extends Activity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With