android apk size,How to reduce Android Apk size

开发者分享如何通过分析Android应用依赖,如Google Play Services和第三方库,来减少7.03MB应用大小,探讨ProGuard使用和依赖库对APK的影响。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

I am developing application which contains below dependency

Module level

dependencies {

compile fileTree(include: ['*.jar'], dir: 'libs')

testCompile 'junit:junit:4.12'

compile 'com.android.support:appcompat-v7:23.3.0'

compile 'com.android.support:design:23.3.0'

compile 'com.google.android.gms:play-services:9.0.0' **// for GCM**

compile 'com.android.support:cardview-v7:23.3.0'

compile 'com.squareup.picasso:picasso:2.5.2' **//Rounding and displaying image from URL**

compile 'com.google.code.gson:gson:2.6.2'

compile 'com.github.lecho:hellocharts-library:1.5.8@aar' **// For bar graph**

compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {

transitive = true;

}

compile 'com.google.firebase:firebase-core:9.0.0' **// Analytics**

}

Project level

dependencies {

classpath 'com.android.tools.build:gradle:2.1.2'

classpath 'com.google.gms:google-services:3.0.0'

classpath 'io.realm:realm-gradle-plugin:1.0.1' // Database

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

my

/Assets /150kb using font aweasome file.

/java - 644 KB

/res - 740 KB (used high resolution image 1920*1280 size 220kb compress with tinypng)

Already applied ProGuard.

delete unused file and codes.

Question

Still my app size is 7.03MB

How can i reduce app size? i don't know why this is 7.03MB

Is there any calculation which give size that used by dependency in apk?

Like google play service occupied around 200kb in apk.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值