I recently made a xamarin binding of a third-party lib which I then built as a nuget.
The third-party lib has a dependancy on the google firebase messaging lib.
I seem to have built my nuget correctly since when I look at the nuget description/dependancies,
it lists :
Xamarin.Firebase.Messaging (>= 70.1710.0-preview2).
Then I use the command line
msbuild xxxxx.csproj /p:Configuration:Release /p:Platform="AnyCPU" /t:SignAndroidPackage to build my app's .apk
When I run the app, it crashes with :
02-21 13:21:13.963: I/art(9201): Rejecting re-init on previously-failed class java.lang.Class<xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/messaging/FirebaseMessagingService;
Sometimes, I build my apk... same command, same everything and it works fine!
I managed to get a working apk and a not working one and try to find the differences between the two and found something weird but I have no idea if it means anything or not. Basically, in the .apk, there's a folder "assemblies" and I can see in both case (working and not working apk) that
Xamarin.Firebase.Messaging.dll is there.
BUT, there's one file that is there in the working .apk but NOT there in the not working .apk... that file is in the root of the .apk and is :
firebase-messaging.properties Inside, there's only the following :
version=17.1.0 client=firebase-messaging firebase-messaging_client=17.1.0
So I'm at a loss here... is my "not-working" .apk not working because it's missing this file? And I can't figure out why sometimes that file is there and sometimes it's not.