googleads / googleads-mobile-unity

Official Unity Plugin for the Google Mobile Ads SDK
https://developers.google.com/admob/unity
Apache License 2.0
1.34k stars 1.08k forks source link

Admob increases APK size by 50MB #3200

Closed olpero closed 3 months ago

olpero commented 3 months ago

[REQUIRED] Step 1: Describe your environment

[REQUIRED] Step 2: Describe the problem

If I build my project the APK size is 120MB. Then if I import admob plugin and add a simple script that shows UMP consent form and initializes admob and then build again the APK size increases to 170MB. How can it increase build size by that much?

Steps to reproduce:

Build your project -> check APK size -> import admob and add a script that uses UMP and initializes MobileAds-> build again -> check APK size

olpero commented 3 months ago

Tested it some more:

The script I add is copied straight from the "Getting Started" guide for the plugin. I only added the required using directives:

using GoogleMobileAds.Api;
using GoogleMobileAds.Ump.Api;
olpero commented 3 months ago

Clean build fixed the issue for me so it probably has nothing to do with admob.