-
Notifications
You must be signed in to change notification settings - Fork 4
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
Unable to build for Android in Unreal Engine 5.2 #215
Comments
Default Unreal Engine auto upload doesn't work with newer NDK's so I had to resort to using bugsnag-cli to manually upload symbols. The problem is the usage of legacy NDK symbols (which was deprecated around NDK 17 IIRC and Unreal uses 25+) being uploaded and I don't know why the BugSnag team has not bothered to update the plugin or their documentation. For anyone facing this issue make sure to disable Auto Upload Symbol Files option in Project Settings -> Plugins -> BugSnag settings. After that build you Android project and follow the bugsnag-cli documentation to upload the symbols or for those who are on Windows, feel free to use this batch script. @echo off
if not exist bugsnag-cli.exe (goto error_cli)
set api_key=
if [%api_key%]==[] (goto error_api)
set app_manifest_filename=AndroidManifest.xml
set app_manifest_path=%cd%\Intermediate\Android\gradle\app\build\intermediates\merged_manifests\release
set app_manifest=%app_manifest_path%\%app_manifest_filename%
set so_filename=libUnreal.so
set so_path=%cd%\Intermediate\Android\gradle\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a
set so_file=%so_path%\%so_filename%
set mapping_filename=mapping.txt
set mapping_path=%cd%\Intermediate\Android\gradle\app\build\outputs\mapping\release
set mapping_file=%mapping_path%\%mapping_filename%
if not exist %app_manifest% (goto error_manifest)
if not exist %so_file% (goto error_so)
if not exist %mapping_file% (goto error_mapping)
set /p app_version="What is the app version? (example: 1.0, 2.0.3 etc.) "
set /p version_code="What is the store version? (Found in Project Settings -> Platforms -> Android -> Store Version) "
@echo Begin upload...
bugsnag-cli.exe create-build --api-key=%api_key% --app-version=%app_version% --app-version-code=%version_code% && bugsnag-cli upload android-ndk %so_file% --api-key=%api_key% --app-manifest=%app_manifest% && bugsnag-cli upload android-proguard %mapping_file% --api-key=%api_key% --app-manifest=%app_manifest%
goto exit
:error_cli
@echo bugsnag-cli.exe was not found in "%cd%". Please download from "https://github.com/bugsnag/bugsnag-cli/releases" and keep it next to this bat file.
goto exit
:error_api
@echo api_key not set. Edit this bat file and set your "api_key" which can be found in Project Settings from your BugSnag dashboard.
goto exit
:error_manifest
@echo "%app_manifest_filename%" does not exist in "%app_manifest_path%". Make sure you packaged your Android project successfully.
goto exit
:error_so
@echo "%so_filename%" does not exist in "%so_path%". Make sure you packaged your Android project successfully.
goto exit
:error_mapping
@echo "%mapping_filename%" does not exist in "%mapping_path%". Make sure you packaged your Android project successfully.
goto exit
:exit
pause |
Hi @ryanjon2040, Did you manage to fix find a workaround to the original issue you were encountering? As Unreal 5.2 is a relatively new release (11 May 2023) we have not yet tested Bugsnag running in this version. Any information you can share on this would be helpful as we have a task on our backlog to test the compatibility with 5.2. In relation to the NDK mappings, Google changed the included objdump utility in version 23 of NDK which means the standard Bugsnag Gradle plugin will not work when using ndk23 or above. This has worked for Unreal versions up until now. It would appear that with the release of 5.2 it is now using v25 therefore our recommendation would to use the Bugsnag cli as you are suggesting. The cli has been developed with this, along with a number of other uses, in mind. |
Hi @johnkiely1 First of all I apologize in case the previous comment came out rude. Now to the workaround, as I mentioned in my previous comment not using automatic upload and manually uploading the NDK symbol and mapping is the only option now. If you just want to fix the original error and upload legacy symbols then download this (thanks to Atiq from Stack Overflow) and extract it to Then in Unreal Engine if you are using automatic BugSnag upload then make sure to disable Android File Server otherwise build will fail. Either disable the whole plugin or disable it in |
Thanks @ryanjon2040, It's worth mentioning in v7 of the bugsnag android gradle plugin we do have the ability to use a newer upload mechanism, which avoids the use |
@ryanjon2040 - just to let you know that unfortunately we haven't been able to find a working solution for our Gradle plugin that is compatible with the newer NDK tooling as Unreal Engine still uses AGP 4 and our support does not go back that far (for the newer NDK support). We're therefore looking at removing the automatic upload of Android mappings in a future release and switching to the native-style integrations we use for Android and iOS apps. Using the CLI is one such solution for Android, so thanks for sharing your wrapper. |
After adding BugSnag to my project in Unreal Engine 5.2 I'm getting the below error and there is no information on the docs or anywhere on how to fix it.
Error screenshot:

The text was updated successfully, but these errors were encountered: