ExzileGames.AndroidCrashlyticsBridge 1.0.25

dotnet add package ExzileGames.AndroidCrashlyticsBridge --version 1.0.25
                    
NuGet\Install-Package ExzileGames.AndroidCrashlyticsBridge -Version 1.0.25
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ExzileGames.AndroidCrashlyticsBridge" Version="1.0.25" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ExzileGames.AndroidCrashlyticsBridge" Version="1.0.25" />
                    
Directory.Packages.props
<PackageReference Include="ExzileGames.AndroidCrashlyticsBridge" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ExzileGames.AndroidCrashlyticsBridge --version 1.0.25
                    
#r "nuget: ExzileGames.AndroidCrashlyticsBridge, 1.0.25"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ExzileGames.AndroidCrashlyticsBridge@1.0.25
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ExzileGames.AndroidCrashlyticsBridge&version=1.0.25
                    
Install as a Cake Addin
#tool nuget:?package=ExzileGames.AndroidCrashlyticsBridge&version=1.0.25
                    
Install as a Cake Tool

AndroidCrashlyticsBridge

A Java bridge + C# interop library for Firebase Crashlytics on .NET Android. Records C# exceptions with proper type grouping so that Crashlytics groups crashes by exception type rather than lumping them all under a single generic bucket.

Problem

When you call FirebaseCrashlytics.getInstance().recordException(throwable) from C# via the Xamarin binding, all recorded exceptions appear under the same generic issue in the Crashlytics dashboard. There is no way to pass a meaningful type name through the raw binding, so NullReferenceException, InvalidOperationException, and every other C# exception look identical.

Solution

This library compiles a Java bridge class directly into your Android project. The Java class constructs a real Throwable subclass whose toString() returns the original C# type name. Crashlytics uses toString() for grouping, so each distinct C# exception type gets its own issue in the dashboard. C# stack traces are also parsed and mapped to StackTraceElement objects so frames are readable in the Crashlytics UI.

APIs Exposed

API Methods
Exception recording RecordException(Exception), RecordException(string type, string message, string stackTrace)
Logging Log(string)
User identification SetUserId(string)
Custom keys SetCustomKey(string, string), SetCustomKey(string, bool), SetCustomKey(string, int), SetCustomKey(string, float)
Collection control SetCollectionEnabled(bool)
Crash detection DidCrashOnPreviousExecution

Setup

1. Add NuGet package

dotnet add package ExzileGames.AndroidCrashlyticsBridge

2. Add google-services.json

Place your google-services.json in the Android app project root and set its build action:

<GoogleServicesJson Include="google-services.json" />

Firebase Crashlytics initializes automatically via FirebaseInitProvider — no explicit FirebaseApp.InitializeApp call is required.

3. Initialize in your Activity

using AndroidCrashlyticsBridge.Interop;

protected override void OnCreate(Bundle? savedInstanceState)
{
    base.OnCreate(savedInstanceState);

    var crashlytics = new AndroidCrashlyticsBridgeImpl(this);
    CrashlyticsBridgeManager.SetImplementation(crashlytics);
}

4. Use from shared code

using AndroidCrashlyticsBridge.Interop;

// Record a caught exception (grouped by C# type in the dashboard)
try
{
    DoSomethingRisky();
}
catch (Exception ex)
{
    CrashlyticsBridgeManager.RecordException(ex);
}

// Attach contextual information
CrashlyticsBridgeManager.SetUserId("player-12345");
CrashlyticsBridgeManager.SetCustomKey("level", 7);
CrashlyticsBridgeManager.SetCustomKey("scene", "MainMenu");

// Write a breadcrumb log
CrashlyticsBridgeManager.Log("Player entered the shop");

// Check if the previous session crashed
if (CrashlyticsBridgeManager.DidCrashOnPreviousExecution)
    ShowCrashRecoveryDialog();

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-android36.0 is compatible.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.25 103 4/9/2026
1.0.24 99 4/9/2026