Default constructor not found (Android)

4 posts, 0 answers
  1. Jay
    Jay avatar
    4 posts
    Member since:
    Jun 2015

    Posted 09 Jul 2018 Link to this post

     

    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>

  2. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1168 posts

    Posted 09 Jul 2018 Link to this post

    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
  3. Lance | Manager Technical Support
    Admin
    Lance | Manager Technical Support avatar
    1168 posts

    Posted 09 Jul 2018 Link to this post

    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
  4. Jay
    Jay avatar
    4 posts
    Member since:
    Jun 2015

    Posted 10 Jul 2018 in reply to Lance | Manager Technical Support Link to this post

    Thanks for the info.  Updating android support libraries fixed the issue.
Back to Top