Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Mono.Android.Export] Fix DynamicDependency to JavaArray
For awhile, we've been observing ILLink warnings:

	ILLink warning IL2036: Java.Interop.DynamicInvokeTypeInfo.ToNative(CodeExpression): Unresolved type 'Android.Runtime.JavaArray' in DynamicDependencyAttribute

The cause is a "typo" in commit 15269f6, which added the
`[DynamicDependency]` custom attributes to
`DynamicInvokeTypeInfo.ToNative()`: commit 15269f6 specified the
non-generic type `Android.Runtime.JavaArray`, which does not exist.

Fix the `[DynamicDependency]` custom attribute value to instead
mention ``Android.Runtime.JavaArray`1``, the type `JavaArray<T>`.
This should fix the IL2036 warning.
  • Loading branch information
jonpryor committed Jul 20, 2021
commit a9d402f6ba0356e9cb9ffd61bf7522d704109931
2 changes: 1 addition & 1 deletion src/Mono.Android.Export/CallbackCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public CodeExpression FromNative (CodeExpression arg)
}

// Ignore ToNative() overload that takes generic instancing mapping. The reflected method should have nothing to do with it.
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaArray", "Mono.Android")]
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaArray`1", "Mono.Android")]
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaCollection", "Mono.Android")]
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaCollection`1", "Mono.Android")]
[DynamicDependency ("ToLocalJniHandle", "Android.Runtime.JavaDictionary", "Mono.Android")]
Expand Down