This is a migrated thread and some comments may be shown as answers.

System.TypeLoadException when using ListView

14 Answers 1858 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Petrushka
Top achievements
Rank 1
Petrushka asked on 01 Mar 2021, 10:04 AM

Hi!

After upgrade to Telerik UI for Xamarin R1 2021.

Content pages that use RadListView will throw System.TypeLoadException error:

03-01 09:37:41.966 D/Mono    ( 1041): Assembly Ref addref Telerik.XamarinForms.DataControls[0xe92528e0] -> System.Core[0xd1e0b8a0]: 11
03-01 09:37:41.966 W/        ( 1041): Could not load signature of Telerik.XamarinForms.DataControlsRenderer.Android.ListViewAccessibilityDelegateCompat:OnInitializeAccessibilityNodeInfo due to: Could not resolve type with token 01000150 from typeref (expected class 'AndroidX.Core.View.Accessibiity.AccessibilityNodeInfoCompat' in assembly 'Xamarin.AndroidX.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null') assembly:Xamarin.AndroidX.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:AndroidX.Core.View.Accessibiity.AccessibilityNodeInfoCompat member:(null)
**System.TypeLoadException:** 'VTable setup of type Telerik.XamarinForms.DataControlsRenderer.Android.ListViewAccessibilityDelegateCompat failed'
 
 
**System.TypeLoadException:** 'VTable setup of type Telerik.XamarinForms.DataControlsRenderer.Android.ListViewAccessibilityDelegateCompat failed'
 
**System.NotImplementedException:** 'The method or operation is not implemented.'
 
03-01 09:58:44.813 W/        ( 2622): exception inside UnhandledException handler: (null) assembly:mscorlib.dll type:NotImplementedException member:(null)
03-01 09:58:44.813 E/mono-rt ( 2622): [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeLoadException: VTable setup of type Telerik.XamarinForms.DataControlsRenderer.Android.ListViewAccessibilityDelegateCompat failed
03-01 09:58:44.813 E/mono-rt ( 2622):   at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.42(intptr,intptr,intptr,intptr,intptr)
03-01 09:58:44.813 E/mono-rt ( 2622):   at (wrapper native-to-managed) Android.Runtime.DynamicMethodNameCounter.42(intptr,intptr,intptr,intptr,intptr)

 

My app will crash after that exception thrown. How to fix this problem?

Thanks!

 

 

14 Answers, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 01 Mar 2021, 01:17 PM

Hi Petrushka,

Thank you for the provided stack trace.

I will need more information on your setup and how the issue could be reproduced.

Could you please open a support ticket and attach a sample project to it, where the issue can be reproduced? I am asking about this as in this way we can research the case further. Once we are aware of the exact setup you have and reproduce the issue, we will be able to investigate it further and provide more information on the matter. 

Also, add steps to reproduce the exception and on which Android device/emulator version the issue occurs.

Thank you for the understanding and I look forward to your reply.

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Petrushka
Top achievements
Rank 1
answered on 02 Mar 2021, 02:47 AM

 

Here is a sample project:

I create a new project, add required AndroidX Packages, and put a RadListView in AboutPage.

It will failed soon when I start debug the app.

 

0
Petrushka
Top achievements
Rank 1
answered on 02 Mar 2021, 02:50 AM

 

Here is a sample project:  

I create a new project, add required AndroidX Packages, and put a RadListView in AboutPage.

It will failed soon when I start debug the app.

 

0
Didi
Telerik team
answered on 02 Mar 2021, 08:06 AM

Hello Petrushka,

I have opened a support ticket on your behalf - ticket id: 1509178. Please attach the sample project there and add the information on which Android device/emulator version the issue can be reproduced. Note that I have removed the links from this forum thread in both replies. I suggest you open a support ticket and attach the projects there. In order to reduce the file size - delete bin and obj folders from all projects. 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Petrushka
Top achievements
Rank 1
answered on 03 Mar 2021, 03:21 AM
Hi!
Thanks for your assist.

After downgrade the Xamarin.Google.Android.Material package to 1.2.1.1 version, the exception still occurred with my project.

So I am revert back to Xamarin.Forms 4.8.0.1821, Telerik UI for Xamarin R3 2020, downgrade Xamarin.Google.Android.Material to 1.0.15, target to Android 9 API 28.

This makes my project build and runs as expected again.

I will try upgrade to Xamarin.Forms 5.0, AndroidX, Telerik for Xamarin packages, target to Android 10 a few weeks later.

Thanks!



0
Ahmed
Top achievements
Rank 1
answered on 03 Mar 2021, 01:54 PM

 I am face the same issue using

1- Xamarin.Forms :- 5.0.0.2012

2- Telerik Verison :- 2020.3.1207.1

0
Ahmed
Top achievements
Rank 1
answered on 03 Mar 2021, 01:57 PM
 I am face the same issue using
1- Xamarin.Forms :- 5.0.0.2012
2- Telerik Verison :- 2020.3.1207.1
0
Didi
Telerik team
answered on 04 Mar 2021, 10:08 AM

Hi all, 

We have this issue logged in our feedback portal: https://feedback.telerik.com/xamarin/1509502-androidx-error-listviewaccessibilitydelegatecompat-failed 

The dev team is researching the case. There will be an update inside the feedback item once we have more information to share. It seems the issue happens when Xamarin.AndroidX.Core version to 1.3.2.2 is used. 

Workaround:

1 option Downgrade the Xamarin.AndroidX.Core version to 1.3.2.1. I have reproduced the issue when  Xamarin.AndroidX.Core version 1.3.2.2 is used.

2 option If you are using Xamarin.Google.Android.Material version 1.3.0.1-> downgrade to Xamarin.Google.Android.Material version 1.2.1.1. it will automatically downgrade the versions of the AndroidX packages it depends on. 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Cristi
Top achievements
Rank 1
answered on 05 Mar 2021, 10:31 PM

Hi, I have this error and I found the faulty package, maybe this can help.

As you see, there it seems to be a misspelled class name (Accessibiity) in :

Could not resolve type with token 01000150 from typeref (expected class 'AndroidX.Core.View.Accessibiity.AccessibilityNodeInfoCompat'...)

In my case reverting Xamarin.AndroidX.MediaRouter package from 1.2.2.1 to a previous version (1.2.1) fixed my problem.

Regards,

Cristi

0
Didi
Telerik team
answered on 07 Mar 2021, 07:31 AM

Hi Chris,

Yes, you are right. The issue is a misspelled class name Accessibiity, which Xamatin.Forms fixed to Accessibility, but this is a breaking change, as now the namespace is different. Here is the link https://github.com/xamarin/AndroidX/commit/b64834625ba231d89afb9c89bdae007a7258eca0#diff-64d65877e1b5eb3de016e98941c7020707c9b317946c38a0e63972fab41e1984

The issue happens in Xamarin.AndroidX.Core package version 1.3.2.2 or higher. Also if you use another Xamarin.AndroidX package which depends on Xamarin.AndroidX.Core 1.3.2.2 version or higher.

Solution:

Downgrade the Xamarin.AndroidX.Core version to 1.3.2.1

Downgrade the versions of the other AndroidX packages which previously depends on Xamarin.AndroidX.Core 1.3.2.2 or higher.

In your case downgrading the Xamarin.AndroidX.MediaRouter fixed the problem as it depends on Xamarin.AndroidX.Media which depends on the Xamarin.AndroidX.Core. -> Downgrading the Xamarin.AndroidX.MeriaRouter downgrades the version of the packages it depends on - AndroidX.Media and AndroidX.Core

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

James
Top achievements
Rank 1
commented on 26 Jul 2021, 10:58 AM

Any news on this? We are now 4 versions behind.
Didi
Telerik team
commented on 26 Jul 2021, 12:11 PM

We have released a lib last week which includes the fix for this issue. The LIB can be used for development purposes. We do not recommend using the lib in production as it is not fully tested. 
Here is more information on this: https://feedback.telerik.com/xamarin/1509502-errors-with-latest-versions-of-androidx

 

The official minor release is expected this week. The public item status will be updated accordingly. Please follow it so you will receive an email notification when there is an update. 

 
0
Edward
Top achievements
Rank 1
answered on 20 Apr 2021, 10:39 PM

I downgraded my Android packages from 

    <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1" />
    <PackageReference Include="Xamarin.AndroidX.Browser" Version="1.3.0.5" />
    <PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.7" />
    <PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.2.2.1" />
   <PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.1" />

To 

    <PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.2.0.1" />
    <PackageReference Include="Xamarin.AndroidX.Browser" Version="1.2.0.1" />
    <PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
    <PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.1.0.1" />

And the issue is gone. The version of Telerik that I´m using is 2021.1.407.20.

Is there a plan to support the latest version of AndroidX versions?

 

Thanks

0
Didi
Telerik team
answered on 21 Apr 2021, 09:04 AM

Hi Edward,

We intentionally haven't compiled against the latest Xamarin.AndroidX.Core yet as this will change the minimum required version for all our customers and all will be forced to upgrade, they will have no choice.

In addition, for the time being, Xamarin.Forms itself does not reference by default the latest AndroidX packages - Xamarin.AndroidX.Core 1.3.2.1 is still used (as a dependency of Xamarin.Google.Android.Material 1.2.1.1). 

We're keeping an eye on the situation and as soon as Xamarin team update the minimum requirements, we'll react accordingly.

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Oleg
Top achievements
Rank 1
Iron
answered on 29 Jun 2021, 02:04 PM | edited on 30 Jun 2021, 10:26 AM

I did versions downgrade and now app crashes at MainActivity:: base.OnCreate( bundle );

with error 'Failed resolution of: Landroidx/core/view/OnReceiveContentViewBehavior;'

With latest version it is running, but crashes on specific element.

Didi
Telerik team
commented on 30 Jun 2021, 06:23 AM

Hi Oleg,

Could you please provide more details on when the exception occurs and what are the steps to reproduce the issue?
Also please elaborate more on this: With latest version it is running, but crashes on specific element. -> which latest version -> Telerik UI for Xamarin or AndroidX?

Oleg
Top achievements
Rank 1
Iron
commented on 30 Jun 2021, 10:29 AM

I added image to my first post.
Error occurs with downgraded version.
Latest version I mean: Xamarin.AndroidX.Core and Xamarin.AndroidX.Legacy.Support.V4
Didi
Telerik team
commented on 30 Jun 2021, 02:05 PM

I am not sure I understood the exact setup you have. As you have mentioned this: Error occurs with downgraded version.
Latest version I mean: Xamarin.AndroidX.Core and Xamarin.AndroidX.Legacy.Support.V4. The error discussed in this forum thread is related to an issue with versions of AndroidX.Core 1.3.2.2 or higher. So you will need to downgrade the AndroidX core version and other AndroidX packages versions that depend on this version. 

If this is not the case, please open a support ticket and attach a sample repro project to it. So I can research the case in details.
0
Didi
Telerik team
answered on 28 Jul 2021, 01:21 PM

Hello,

We have released a new official minor release version of Telerik UI for Xamarin 2021.2.728.1. This version contains the fix for the AndroidX.Core. https://feedback.telerik.com/xamarin/1509502-errors-with-latest-versions-of-androidx status of this bug report is Completed.

Telerik UI for Xamarin v 2021.2.728.1 is built against Xamarin.Forms 5.0.0.2083. So you will need to update the Xamarin.Forms version to 5.0.0.2083.

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
ListView
Asked by
Petrushka
Top achievements
Rank 1
Answers by
Didi
Telerik team
Petrushka
Top achievements
Rank 1
Ahmed
Top achievements
Rank 1
Cristi
Top achievements
Rank 1
Edward
Top achievements
Rank 1
Oleg
Top achievements
Rank 1
Iron
Share this question
or