Skip to content

Android Application Bundles (aab) not exporting correctly for Mono projects #48458

Closed
@andy-noisyduck

Description

Godot version:
3.3 (Mono)

OS/device including version:
Win 10 exporting to Android 11

Issue description:
After exporting a Mono app using the AAB support added in 3.3, the app will successfully export but will crash on the device.

System.DllNotFoundException: __Internal assembly:<unknown assembly> type:<unknown type> member:(null)
   at (wrapper managed-to-native) System.TimeZoneInfo+AndroidTimeZones.monodroid_get_system_property(string,intptr&)
   at System.TimeZoneInfo+AndroidTimeZones.GetDefaultTimeZoneName () [0x00029] in <a947100bfc9e4b689622af54e1e07934>:0
   at System.TimeZoneInfo+AndroidTimeZones.get_Local () [0x00000] in <a947100bfc9e4b689622af54e1e07934>:0
   at System.TimeZoneInfo.CreateLocal () [0x00000] in <a947100bfc9e4b689622af54e1e07934>:0
   at System.TimeZoneInfo.get_Local () [0x00009] in <a947100bfc9e4b689622af54e1e07934>:0
   at System.TimeZoneInfo.ConvertTimeToUtc (System.DateTime dateTime, System.TimeZoneInfoOptions flags) [0x00000] in <a947100bfc9e4b689622af54e1e07934>:0
   at System.DateTime.ToUniversalTime () [0x00000] in <a947100bfc9e4b689622af54e1e07934>:0

The same project exported as an APK does not crash, and runs as expected.

I suspect whether or not you hit this exception depends on which bits of Mono you are using in your project. Some API calls seem to be linked correctly, and some do not.

I'm unsure if related to this earlier issue #33851 - but they share the same error message.

Steps to reproduce:

  1. Call a method that invokes something in monodroid - e.g. DateTime.ToUniversalTime()
  2. Export application as APK and run on device - it should work as expected.
  3. Export application as AAB and run on device (e.g. via bundletool, or via Play Store) - it will crash.

Minimal reproduction project:
Testing-AndroidAABLinking.zip

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions