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 all 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
41 changes: 41 additions & 0 deletions docs/platforms/godot/configuration/android.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
title: Exporting for Android
description: "Learn how to set up Android export with Sentry integration"
sidebar_order: 100
---

Additional steps are required to be able to export your game for Android with Sentry integration.

## Setting up export for Android

If you haven't exported for Android before, follow the [Godot Android export guide](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.

### Step 1: Install Gradle Build Template

Exporting for Android with Sentry SDK requires using Godot's Gradle build system. By default, Godot doesn't use Gradle build, so it needs to be enabled.

If you haven't already, you need to install the Android build template first. 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.

### Step 2: Configure Android Export

1. **Create Export Preset**: If you don't have an export preset, you need to create one: 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](imgs/android_export.png)

### Step 3: Export Your Project

Once configured, export your project normally. During export, Godot will automatically:
- Generate fresh templates using the Gradle build system
- Include Sentry SDK dependencies in the Gradle configuration
- Build your APK/AAB with Sentry integration

## Known Limitations

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

- Automatic screenshots on crashes are not yet supported on Android. ([#238](https://github.com/getsentry/sentry-godot/issues/238))
- Local variable values in GDScript stack traces are not currently captured. ([#232](https://github.com/getsentry/sentry-godot/issues/232))

These limitations will be addressed in future versions of the SDK.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.