@jrahma can you give more detail? Which error message should we be looking at here?
Do you need a proguard rule for this type?
java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.provider.FirebaseInitProvider" on path
I am not using proguard, do I need to use it?

Code Shrinker = r8 uses proguard rules, stripping Java code, r8 is _mostly_ backwards compatible with proguard.
@jonathanpeppers do I need to add all the below from Microsoft website including this line?
-keep class com.google.firebase.provider.FirebaseInitProvider
From Microsoft:
# This is Xamarin-specific (and enhanced) configuration.
-dontobfuscate
-keep class com.google.firebase.provider.FirebaseInitProvider
-keep class mono.MonoRuntimeProvider { *; <init>(...); }
-keep class mono.MonoPackageManager { *; <init>(...); }
-keep class mono.MonoPackageManager_Resources { *; <init>(...); }
-keep class mono.android.** { *; <init>(...); }
-keep class mono.java.** { *; <init>(...); }
-keep class mono.javax.** { *; <init>(...); }
-keep class opentk.platform.android.AndroidGameView { *; <init>(...); }
-keep class opentk.GameViewBase { *; <init>(...); }
-keep class opentk_1_0.platform.android.AndroidGameView { *; <init>(...); }
-keep class opentk_1_0.GameViewBase { *; <init>(...); }
-keep class android.runtime.** { <init>(***); }
-keep class assembly_mono_android.android.runtime.** { <init>(***); }
# hash for android.runtime and assembly_mono_android.android.runtime.
-keep class md52ce486a14f4bcd95899665e9d932190b.** { *; <init>(...); }
-keepclassmembers class md52ce486a14f4bcd95899665e9d932190b.** { *; <init>(...); }
# Android's template misses fluent setters...
-keepclassmembers class * extends android.view.View {
*** set*(***);
}
# also misses those inflated custom layout stuff from xml...
-keepclassmembers class * extends android.view.View {
<init>(android.content.Context,android.util.AttributeSet);
<init>(android.content.Context,android.util.AttributeSet,int);
}
I usually only put rules in my apps when I a hit a crash, so I would start with:
-keep class com.google.firebase.provider.FirebaseInitProvider
Here is a good blog post to learn about proguard rules: https://www.jon-douglas.com/2016/11/22/xamarin-android-proguard/
If you don't want to go through this, you can probably set Code Shrinker to None for now.
I had to get rid of the r8 just to get it up and running which is sad decision but at least it's working now
Thanks @jonathanpeppers
I kept r8 to keep low size of my production app and included this line in my proguard.cfg. Worked for me.
-keep class com.google.firebase.provider.FirebaseInitProvider
Edit: this caused the app not to be able to initialize firebase service. I had to add additionally:
-dontwarn com.google.android.gms.*
-keep class com.google.android.gms.* { ; }
-keep class com.google.firebase.* { *; }
Yes @Adlorem that sounds right, my guess here is that more proguard rules were needed.
@jrahma I think we can actually close this, as I don't think there was a problem in Xamarin.Android here, let me know, thanks!
Most helpful comment
I kept r8 to keep low size of my production app and included this line in my proguard.cfg. Worked for me.
-keep class com.google.firebase.provider.FirebaseInitProvider
Edit: this caused the app not to be able to initialize firebase service. I had to add additionally:
-dontwarn com.google.android.gms.*
-keep class com.google.android.gms.* { ; }
-keep class com.google.firebase.* { *; }