locked
Debug Error RRS feed

  • Question

  • User91922 posted

    Hi,

    When i update xamarin.Forms package from nuget and rebuid solution i getting below error.

    Error 363 The "LinkAssemblies" task failed unexpectedly. Xamarin.Android.XamarinAndroidException: error XA2006: Reference to metadata item 'System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.3.2.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.3.2.0, Culture=neutral, PublicKeyToken=null' could not be resolved. ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32) at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference) at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction) at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body) at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method) at Mono.Linker.Steps.MarkStep.ProcessQueue() at Mono.Linker.Steps.MarkStep.Process() at Mono.Linker.Steps.MarkStep.Process(LinkContext context) at Mono.Linker.Pipeline.Process(LinkContext context) at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context) at Xamarin.Android.Tasks.LinkAssemblies.Execute() --- End of inner exception stack trace --- at Xamarin.Android.Diagnostic.Error(Int32 code, Exception innerException, String message, Object[] args) at Xamarin.Android.Tasks.LinkAssemblies.Execute() at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() Marcone.Android

    Friday, February 6, 2015 3:37 AM

Answers

  • User52517 posted

    Hi Everyone,

    I'm from the Support team, I checked with the Forms engineers and Joe Mitchell's response is correct, the resolution to this issue is to make sure you have API 23/Android 6.0 installed, & set the Target Framework to Android 6.0 (or "Use latest installed platform.")

    However, I noticed a point of confusion that can easily occur is if you only set the Target Android Version in the app manifest; you'll still hit the error. (This is particularly true for Xamarin Studio users, since the settings are on different tabs.) Our Forms team recommends setting both the Target framework & Target Android version to API 23 / Android 6.0; and the minimum Android version to at least API 15. This is considered the supported configuration.

    ---Setting in Xamarin Studio--- 1) Right click on the Android project. 2) Go to Build -> General -> Target Framework. 3) Set the Target Framework to Android 6.0 (latest installed can work too, as noted above.) 4) Still in the project options, go to Build -> Android Application. 5) Set the minimum Android version to at least API level 15, & the target Android version to API level 23.

    ---Setting in Visual Studio--- 1) Right click on the Android project. 2) Go to "Application" in the project options. 3) Set the Compile using Android version & Target Android version settings to API level 23 / Android 6.0. 4) Set the Minimum Android to target setting to at least API level 15.

    Hope this helps! -Kent Green Customer Support

    EDIT I updated my message to cover more recent versions. The versions are also covered in this doc: https://developer.xamarin.com/guides/xamarin-forms/getting-started/installation/#Android

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 18, 2015 2:05 AM

All replies

  • User13327 posted

    Same here :(

    Friday, February 6, 2015 12:09 PM
  • User25720 posted

    Same for me. On a stable release of forms…

    Friday, February 6, 2015 2:46 PM
  • User74190 posted

    Same here, this is really not cool..

    Friday, February 6, 2015 4:48 PM
  • User68313 posted

    Setting the Target Framework to 5.0 (21) resolved this for me. There's another thread from December on the issue forums.xamarin.com/discussion/29768/another-appcompat-build-problem

    Saturday, February 7, 2015 12:35 AM
  • User92953 posted

    @JoeMitchell Thanks for the solution. Yes it worked for me too. :)

    Monday, February 9, 2015 7:37 AM
  • User25041 posted

    We have the same issue. Anyone able to get it working with a target framework of 19?

    Wednesday, February 11, 2015 2:14 AM
  • User25041 posted

    Tried setting to 21 and we still have the issue.

    Wednesday, February 11, 2015 4:02 AM
  • User52517 posted

    Hi Everyone,

    I'm from the Support team, I checked with the Forms engineers and Joe Mitchell's response is correct, the resolution to this issue is to make sure you have API 23/Android 6.0 installed, & set the Target Framework to Android 6.0 (or "Use latest installed platform.")

    However, I noticed a point of confusion that can easily occur is if you only set the Target Android Version in the app manifest; you'll still hit the error. (This is particularly true for Xamarin Studio users, since the settings are on different tabs.) Our Forms team recommends setting both the Target framework & Target Android version to API 23 / Android 6.0; and the minimum Android version to at least API 15. This is considered the supported configuration.

    ---Setting in Xamarin Studio--- 1) Right click on the Android project. 2) Go to Build -> General -> Target Framework. 3) Set the Target Framework to Android 6.0 (latest installed can work too, as noted above.) 4) Still in the project options, go to Build -> Android Application. 5) Set the minimum Android version to at least API level 15, & the target Android version to API level 23.

    ---Setting in Visual Studio--- 1) Right click on the Android project. 2) Go to "Application" in the project options. 3) Set the Compile using Android version & Target Android version settings to API level 23 / Android 6.0. 4) Set the Minimum Android to target setting to at least API level 15.

    Hope this helps! -Kent Green Customer Support

    EDIT I updated my message to cover more recent versions. The versions are also covered in this doc: https://developer.xamarin.com/guides/xamarin-forms/getting-started/installation/#Android

    • Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
    Wednesday, February 18, 2015 2:05 AM
  • User109637 posted

    Having the same issue and upgrading to 5.0 is not an option. Any idea if there is a workaround or if the issue gets fixed somehow?

    Saturday, February 28, 2015 8:56 PM
  • User109637 posted

    Actually I do not get the error message during built but when the following line is executed:

    listView.ScrollTo(vm.SelectedItem, ScrollToPosition.MakeVisible, true);

    Saturday, February 28, 2015 8:59 PM
  • User92582 posted

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: error XA2006: Reference to metadata item 'System.Void Android.Widget.AbsListView::SetSelectionFromTop(System.Int32,System.Int32)' (defined in 'Xamarin.Forms.Platform.Android, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Platform.Android, Version=1.4.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. (SandiskPeople.Android)

    I am also getting the same error. This error only occurs when we try to release the app. The target version is 21 and we have the same issue

    Thursday, April 9, 2015 11:22 PM
  • User92582 posted

    Was anyone able to resolve this issue?

    Friday, April 10, 2015 5:04 PM
  • User7479 posted

    Still having this issue, and still unable to resolve it regardless of the Minimum/Target Android version and using Xamarin Forms 1.4.2.6359. Has anyone found a solution?

    Friday, June 12, 2015 1:00 AM
  • User459 posted

    1.4.4.6392 this same error Error log:

    /AndroidManifest.xml: Warning XA4211: AndroidManifest.xml //uses-sdk/@android:targetSdkVersion '22' is less than $(TargetFrameworkVersion) ''. Using API-23 for ACW compilation. (XA4211) (Tarot.Droid)

    /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task LinkAssemblies: error XA2006: Reference to metadata item 'Xamarin.Forms.BindableProperty Xamarin.Forms.BindableProperty::Create(System.Linq.Expressions.Expression1<System.Func2>,!!1,Xamarin.Forms.BindingMode,Xamarin.Forms.BindableProperty/ValidateValueDelegate1<!!1>,Xamarin.Forms.BindableProperty/BindingPropertyChangedDelegate1,Xamarin.Forms.BindableProperty/BindingPropertyChangingDelegate1<!!1>,Xamarin.Forms.BindableProperty/CoerceValueDelegate1)' (defined in 'Xamarin.Forms.Labs, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null') from 'Xamarin.Forms.Labs, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null' could not be resolved. (Tarot.Droid)

    Friday, August 28, 2015 10:06 AM
  • User187039 posted

    Hi all, Did anyone get the solution? Please help.

    Friday, May 6, 2016 5:24 AM
  • User204427 posted

    I am also getting the same error in release mode. This error occurs only when setting the linking option to Sdk Assemblies only. I am compiling with target and compile version 6.0

    Wednesday, May 25, 2016 5:48 AM
  • User73826 posted

    A whole year and the issue persists... :( Not good.

    Wednesday, September 7, 2016 1:11 AM