This is a migrated thread and some comments may be shown as answers.
Default constructor not found (Android)
3 Answers 52 Views
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 09 Jul 2018, 05:39 PM

 

Telerik 2018.2.620.2, MonoAndroid 8.0

getting an exception on android only: 
System.MissingMethodException: Default constructor not found for type Telerik.XamarinForms.DataControlsRenderer.Android.ListView.ListViewTemplateCellRenderer occurred

Added SkiaSharp.Views.Forms, doesn't seem to help.  

              <telerikDataControls:RadListView.ItemTemplate>
                    <DataTemplate>
                        <telerikListView:ListViewTemplateCell>
                            <telerikListView:ListViewTemplateCell.View>
                                <Grid Margin="20"> 

                                 </Grid>
                            </telerikListView:ListViewTemplateCell.View>
                        </telerikListView:ListViewTemplateCell>
                    </DataTemplate>
                </telerikDataControls:RadListView.ItemTemplate>

3 Answers, 1 is accepted

Sort by
0
Lance | Manager Technical Support
Telerik team
answered on 09 Jul 2018, 05:58 PM
Hi Jay,

Unfortunately this isn't enough information to determine the cause and I was not able to replicate the issue using the ListViewTemplateCell demo.

There are some common things to check for:

- Make sure you've added all the RadList Required Telerik Assemblies
- Make sure the Android project has Required Android Support Libraries

If you have any further issues after adding the missing pieces and doing a Rebuild, open a support ticket here and attach project so I can investigate directly.

Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Lance | Manager Technical Support
Telerik team
answered on 09 Jul 2018, 06:13 PM
Hello Jay,

I just finished reviewing recent bug reports and found one that may, or may not, be relevant. 

Since you only shared the template, I can't see the rest of the RadListView to confirm, but it would take less than a minute to apply the suggested workaround as a quick test.


Test 

Define the ItemTemplate in the page/app resources and use a StaticResource instead, for example:

In App Resources
 
<ResourceDictionary>
    <DataTemplate x:Key="MyItemTemplate">
        <Grid>
            <Label Text="{Binding MyProperty}"/>
        </Grid>
    <DataTemplate>
</ResourceDictionary>
 
RadListView
<dataControls:RadListView ItemTemplate="{StaticResource MyItemTemplate}" />


Regards,
Lance | Tech Support Engineer, Sr.
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Jay
Top achievements
Rank 1
answered on 10 Jul 2018, 08:22 PM
Thanks for the info.  Updating android support libraries fixed the issue.
Asked by
Jay
Top achievements
Rank 1
Answers by
Lance | Manager Technical Support
Telerik team
Jay
Top achievements
Rank 1
Share this question
or