Edit

.NET for Android error XA4255

Example message

error XA4255: Generated trimmable type map Java source 'obj/Release/net11.0-android/typemap/java/my/app/MainActivity.java' was not found.

Issue

The post-trim trimmable type map scan expected to copy a generated Java source file from the pre-trim Java source directory, but the file was missing.

This can happen if intermediate build outputs are stale or if the generated Java source list no longer matches the files on disk.

Solution

Delete the project's obj and bin directories, then rebuild.

If the error persists after a clean rebuild, file an issue at https://github.com/dotnet/android/issues and include the full build log.