Open atlasapplications opened 2 days ago
I'm unable to reproduce with Godot v4.3.stable.mono.official [77dcf97d8] using the default .csproj created by Godot (only changing the TFM to net9.0
):
<Project Sdk="Godot.NET.Sdk/4.3.0">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
</PropertyGroup>
</Project>
Looks like Android is complaining about some native .NET libraries. I don't know what the error means by "unreadable libraries". Is it that it doesn't have enough permissions to read them? Is it that the files are missing? Or could it be that those native libraries were built for a different target architecture?
You can also try to clear that cache directory (/data/data/com.example.test1/cache/
). It may be that those files are outdated from a previous export, but I think this is unlikely because the hash of those files would be different.
Android exports also changed quite a bit in 4.4, we know put those native libraries in the /lib
directory of the APK instead of /assets
, so it may have solved the issue. Can you try exporting with 4.4.dev3 and see if it makes a difference?
Also doesn't work on iOS which might be the same issue.
iOS exports works very differently from other platforms and uses the NativeAOT runtime, so it's likely a different issue.
I uploaded an MRP just in case our settings are different.
You can also try to clear that cache directory (/data/data/com.example.test1/cache/). It may be that those files are outdated from a previous export, but I think this is unlikely because the hash of those files would be different.
I cleared that as recommended and tried a different package name so it installed into a different directory. But the same error showed.
Can you try exporting with 4.4.dev3 and see if it makes a difference?
Yep! I'll try that next.
I'm still unable to reproduce with your MRP, it may be a difference on the Android device/emulator. Can you share the system information? (i.e.: Android OS version)
Can you share the system information? (i.e.: Android OS version)
Updated!
I tested on 4.4.dev3
and this did indeed make a difference. The crash did not occur so it seems the issue could have been fixed.
Tested versions
System information
Built on Windows 11 Tested on Google Pixel 8 (Android 14)
Issue description
Although the editor appears to successfully export the Android
apk
using.NET 9
, when launched, it crashes on startup. Using the Logcat I'm able to retrieve this error:It appears that those are native libraries that are not being loaded. Looks similar to #65863 which points in the direction that
.NET
is not actually being included in the export. Seems to work fine in the editor and when exported to Windows. Also doesn't work on iOS which might be the same issue.Steps to reproduce
.NET 9
.Minimal reproduction project (MRP)
android_export_crash.zip