Bug 10268 - Linker issue with horizontallistview project in release mode
Summary: Linker issue with horizontallistview project in release mode
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.8.x
Hardware: PC Windows
: Normal normal
Target Milestone: 5.1
Assignee: Bugzilla
Depends on:
Reported: 2013-02-13 05:47 UTC by Abdelkader
Modified: 2015-05-05 11:24 UTC (History)
10 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Abdelkader 2013-02-13 05:47:33 UTC
Trying to execute this sample https://github.com/Cheesebaron/Cheesebaron.HorizontalListView , I'm getting an issue with linker, when it's none it works, but when setting to sdk assemblies only i'm getting an exception:

UNHANDLED EXCEPTION: System.ArgumentException: Couldn't bind to method 'GetGetAdapterHandler'.
at System.Delegate.GetCandidateMethod (System.Type,System.Type,string,System.Reflection.BindingFlags,bool,bool) <0x00290>
at System.Delegate.CreateDelegate (System.Type,System.Type,string,bool,bool) <0x00053>
at System.Delegate.CreateDelegate (System.Type,System.Type,string) <0x00033>
at Android.Runtime.JNIEnv.RegisterJniNatives (intptr,int,intptr,intptr,int) <0x006df>
at (wrapper delegate-invoke) <Module>.invoke_intptr__this___intptr_intptr_intptr_JValue[] (intptr,intptr,intptr,Android.Runtime.JValue[]) <0x000ab>
at Android.Runtime.JNIEnv.CallObjectMethod (intptr,intptr,Android.Runtime.JValue[]) <0x00053>
at Android.Views.LayoutInflater.Inflate (int,Android.Views.ViewGroup) <0x0018f>
at RedFabriQ.mCatalog.Player.Droid.HomeActivity/VerticalAdapter.GetView (int,Android.Views.View,Android.Views.ViewGroup) <0x0004f>
at Android.Widget.ArrayAdapter.n_GetView_ILandroid_view_View_Landroid_view_ViewGroup_ (intptr,intptr,int,intptr,intptr) <0x00087>
at (wrapper dynamic-method) object.ffe11527-2e87-4e53-8958-d56cfaf29cc7 (intptr,intptr,int,intptr,intptr) <0x0005b>

Any help.
Comment 2 Jonathan Pryor 2013-02-26 10:53:43 UTC
The workaround is to provide a custom link script:


Creating a new file (e.g. `FixAdapterLinking.xml`), set its Build action to LinkDescription, with the contents:

  <?xml version="1.0" encoding="UTF-8" ?>
    <assembly fullname="Mono.Android">
      <type fullname="Android.Widget.AdapterView" >
        <method name="GetGetAdapterHandler" />
        <method name="GetSetAdapter_Landroid_widget_Adapter_Handler" />
Comment 3 Radek Doulik 2014-11-23 05:50:43 UTC
it is now fixed in master 216f75038afee2105182fc6af329f1fc83c4298f
Comment 4 Bjarne Fisker 2015-01-23 07:34:08 UTC
This bug might need to be reopened. I just encountered the exact same bug in the current version of Xamarin 5.7(build 667) .

The workaround above fixed the problem for me.
Comment 5 Manwatermelon 2015-03-10 10:30:45 UTC
This bug reproduces on Xamarin 5.7.2 (build 7)
Comment 6 Jonathan Pryor 2015-03-10 11:45:19 UTC
Xamarin 5.7.2 is Xamarin.Android 4.20. The bug fix is in Xamarin.Android 5.0.

You could try the Xamarin.Android 5.0 preview:

Comment 7 Rajneesh Kumar 2015-05-05 11:24:47 UTC
I have checked this issue with the following builds:

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938
Installed Version: Professional
Xamarin   3.11.507.0 (dfac85e)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android (cbdf025e886eacb95ce7adf53346961156fae990)
Visual Studio plugin to enable development for Xamarin.Android.

I observed that this issue working fine. Now, user does't get exception when setting to sdk assemblies only.
Here is the screencast for the same: http://www.screencast.com/t/zrTUPa78qy

This issue has been fixed hence I am closing this issue.