문제

I'm trying to integrate BugSense into my Xamarin Android project.

I followed this guide and when I built my project I got LinkAssemblies error:

Error 1 error MSB4018: The "LinkAssemblies" task failed unexpectedly. 0 0 Error 2 error MSB4018: Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'Android.Views.SurfaceOrientation Android.Views.Display::get_Rotation()' (defined in 'BugSense.Xamarin.Android, Version=3.6.0.2, Culture=neutral, PublicKeyToken=null') from 'BugSense.Xamarin.Android, Version=3.6.0.2, Culture=neutral, PublicKeyToken=null' could not be resolved. 0 0

I tried to add BugSense library via Package Manager Console, then by adding DLL to References and then via NuGet. I built it with Visual Studio 2012 and also with Xamarin Studio but everything failed the same.

도움이 되었습니까?

해결책

The error suggests a problem with linking assemblies.

Try setting Linking to None in Project properties -> Android Options -> Configuration properties.

다른 팁

Xamarin.Android applications use a linker in order to reduce the size of the application.The default value is SdkOnly

  • None: No linking will be attempted.
  • SdkOnly: Linking will be performed on the base class libraries only, not user's assemblies.
  • Full: Linking will be performed on base class libraries and user assemblies. For more details refer here.. Note: if you are facing an issue with linking such as

LinkAssemblies" task failed unexpectedly. or

"GetAdditionalResourcesFromAssemblies" task failed unexpectedly. System.IO.FileNotFoundException: . Perhaps it doesn't exist in the Mono for Android profile?

then recheck your xamarin.Android project settings and set the below tag,

<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>

Hope it will be helpful.

add Api 21 and set its targeted Framework 5.0 and restart your Xamarin ..

its works on my system..

In Release Mode for all Projects set project prop => advances => Debug Info = Node

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top