why admob increases size of my app 5mb?

2019-08-06 20:19发布

问题:

I am using android studio.I follwed these steps https://developers.google.com/admob/android/quick-start

After added admobs my app size increased almost 5mb.it was 13mb after became 18mb.

回答1:

Using

compile 'com.google.android.gms:play-services:7.5.0'

Implies you are using every feature of Google Play Services, including location services. If you only need a particular API, you should be using the selective APIs.

In the case of ads, you can use solely:

compile 'com.google.android.gms:play-services-ads:7.5.0'


回答2:

I'd recommend looking at how to reduce app size increased after admob ads?

Simply put: The library has a lot of extra stuff. You need to use ProGuard to strip that out.