Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Enabling Push Notifications crash the app on start (Android)

$
0
0

Xamarin.Forms v.4.5.0.396

I'm working on a new project and I wanted to enable Push Notifications with AppCenter.
I enabled Push Notifications and everything was working great when running the app on my device while developing the app.
I was able to receive Push Notifications.
I setup Azure DevOps and distribute the app through AppCenter only to myself.
The app crashed when I tried to open it.
I got a crash report from AppCenter with the message: Unable to instantiate receiver com.google.firebase.iid.FirebaseInstanceIdReceiver
After some hours of search, I find out that one of the differences between the debug and release configuration of the app is the Dex Compiler
In the debug configuration, the Dex Compiler was set to dx while on release configuration was set to d8 (also the Code Shrinker was set to r8)
I set in release configuration the Dex Compiler to dx and remove the setting of the Code Shrinker.
I was able to run the app without any issues.
My question is, can I have Dex Compiler set to d8 and the Code Shrinker to r8 in order to have a smaller app without having problems with Push Notifications?
Does anyone have other similar issues with the Dex Compiler and the Code Shrinker? (I mean apart from Push Notifications)


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>