MTAdmob icon indicating copy to clipboard operation
MTAdmob copied to clipboard

Exception when deploying a project with code shrinker 'r8' enabled

Open potnoddle opened this issue 2 years ago • 2 comments

When trying to deploy a build with code shrinker enabled and MTSAdmod installed it fails with the following errors. Is there any way to fix with without disabling code shrinker. I've enabled multidex and tried to skip linking 'Xamarin.GooglePlayServices.Ads.Lite', without luck.

Java.Lang.RuntimeException Message=Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.MobileAdsInitProvider" on path: DexPathList[[zip file "/data/app/~~9JnxTWQqYdiVLuM95aPgDw==/com.allthingsdeveloped.mixologist-E6CdOBJvC0R3CAxubUr-hw==/base.apk"],nativeLibraryDirectories=[/data/app/~~9JnxTWQqYdiVLuM95aPgDw==/com.allthingsdeveloped.mixologist-E6CdOBJvC0R3CAxubUr-hw==/lib/arm64, /data/app/~~9JnxTWQqYdiVLuM95aPgDw==/com.allthingsdeveloped.mixologist-E6CdOBJvC0R3CAxubUr-hw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]

I've also tried adding, with limited success, the following meta-data it seemed to work for a while.

potnoddle avatar Nov 25 '21 11:11 potnoddle

Hi, I haven't tried to enable the code shrinker in my apps so I never had this problem. I will investigate it, meanwhile if you find a solution, please write it here as it could be useful for other people too.

Thank you

marcojak avatar Dec 31 '21 15:12 marcojak

Hi guys!

This issues is repeated #58 . I tried to find some answer by modifying the TargetFrameworks of the solution, but I don't quite understand why the project doesn't compile in R8. But most likely it is the configuration done for the solution. When I have some time I will continue to evaluate this point.

Best regards.

roswer13 avatar Jan 10 '22 08:01 roswer13