Edit

.NET for Android error XA4217

Example messages

error XA4217: Architecture 'x86' has Java types which have no counterparts in template architecture 'arm64-v8a': MyNamespace.MyType

Issue

When building for multiple Android architectures, each architecture must produce the same set of Java callable wrapper types. This error means one architecture generated Java types that do not exist in the template (first) architecture.

Solution

Ensure that all target architectures reference the same set of managed types that derive from Java.Lang.Object. If architecture-specific code is needed, use runtime checks rather than conditional compilation that adds or removes Java-bound types per architecture.