C# Xamarin Java.Interop error?

前端 未结 8 1840
一向
一向 2021-02-07 17:08

Hello since the last Xamarin update we get this error.

CS0012 The type \'IJavaPeerable\' is defined in an assembly that is not r

相关标签:
8条回答
  • 2021-02-07 18:07

    You can directly copy the assembly Java.Interop.dll from the C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0 to the bin/Debug folder of your project to resolve the issue.

    This procedure perfectly worked for me.

    Thanks,

    0 讨论(0)
  • 2021-02-07 18:08

    You can hover over the offending line and see the missing DLL.

    Now add the missing reference;

    1. Open the Solution Explorer, and within References right click, and select Add Reference

    2. Within the Reference Manager click Browse, and Browse again.

    3. In the file dialog copy and paste this path:

      C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v1.0\

    Click Java.Interop.dll

    1. Okay the Reference Manager
    0 讨论(0)
提交回复
热议问题