Skip to content

Godot: Add page for Android support #14270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions docs/platforms/godot/android-support/index.mdx
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's odd to have this page be top level while desktop isn't. when we add iOS and Web would those also get dedicated pages? we don't do this on other game engine sdks usually.

Copy link
Collaborator Author

@limbonaut limbonaut Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So where should we place it if not top-level? Don't think we want to clutter the landing page.

UPDATE:
Perhaps, this belongs in configuration?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to configuration section, removed features, and streamlined the rest.

Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: Android Support
description: "Learn how the Godot SDK handles Android support."
sidebar_order: 100
---

The Sentry SDK for Godot provides comprehensive support for reporting script errors, native crashes, and custom events on Android platform.

## What We Support

The Sentry Godot SDK supports most essential features when running on Android:

- **Script Errors**: Capture and report GDScript runtime errors with full stack traces.
- **Native Crashes**: Detect and report native C++ crashes that occur in the Godot engine or native extensions.
- **Custom Events**: Track custom events and gameplay interactions.
- **Scene Tree**: Include the current state of scene tree hierarchy in error reports.
- **Tags**: Add custom tags to categorize and filter events.
- **Breadcrumbs**: Automatic and manual breadcrumbs, including Android-specific device events.
- **Contexts**: Device, OS, and application context information, as well as Godot-specific context and custom contexts added by developers.
- **Attachments**: Include additional files and data with error reports.

## Getting Started

Setting up Sentry for Android exports requires using Godot's Gradle build system. The Sentry SDK automatically integrates with your Gradle project, but you need to set up the Android build template first.

### Prerequisites
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like On-boarding instructions. But it involves general Godot Android on-boarding; right? so if the dev already has the game running on Android, are all these step needed?

We have on-boarding stuff on the landing page. ideally this goes there. maybe with the tab control to pick platform target.

Copy link
Collaborator Author

@limbonaut limbonaut Jul 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Users MUST set up Gradle build system. Normally, this is not required. You can export Godot projects to Android without involving Gradle build.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so if the dev already has the game running on Android, are all these step needed?

Not all of these steps are needed, but some are absolutely required. I think it's better to be explicit, in case users are coming fresh without any export set up initially. But let me know if you think we shouldn't go extra mile here.


Before you can export to Android with Sentry support, you must:

1. **Set up Android SDK**: Follow the [Godot Android export setup](https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_android.html) to configure your Android SDK and Java SDK paths in Godot's Editor Settings.

2. **Download Export Templates**: Make sure export templates are downloaded for your Godot version. Go to `Project -> Export...` and download templates if needed.

### Install Gradle Build Template

Go to `Project -> Install Android Build Template...` in the Godot editor and click "Install" in the confirmation dialog. This creates a Gradle-based Android project under `res://android/build/` in your project directory. The Sentry SDK will automatically integrate with this Gradle project.

### Configure Android Export

1. **Create Export Preset**: Go to `Project -> Export...` and add a new Android export preset.
2. **Enable Gradle Build**: In the export preset, go to `Options -> Gradle Build` and enable the `Use Gradle Build` option.
3. **Configure Other Settings**: Set up your package name, icons, permissions, and other Android-specific settings as needed.

![Android Export Settings](img/android_export.png)

### Export Your Project

When you export your project (or use one-click deploy), Godot will:
- Call the Gradle build system to generate fresh templates.
- The Sentry SDK automatically adds its dependencies to the Gradle configuration.
- Build your APK/AAB with Sentry integration included.

## Known Limitations

While the Android support is comprehensive, there are some current limitations:

- Automatic screenshots on crashes are not yet supported on Android.
- Local variable values in GDScript stack traces are not currently captured.

These limitations will be addressed in future versions of the SDK.