Error when using BusyIndicator

13 posts, 0 answers
  1. Osayed
    Osayed avatar
    7 posts
    Member since:
    Feb 2018

    Posted 12 Jun 2018 Link to this post

    Hello, When i'm creating a new instance of the RadBusyIndicator I get this error:

    Constructor on type Telerik.XamarinForms.Primitives/Animation-1 not found


  2. Lance | Team Lead - US DevTools Support
    Admin
    Lance | Team Lead - US DevTools Support avatar
    1047 posts

    Posted 13 Jun 2018 Link to this post

    Hi Osayed,

    Unfortunately, this is not enough information for me to determine what the problem might be. The AnimationType list can be found in the Animations documentation article.

    Here's an example of setting one.

    <telerikBusyIndicator:RadBusyIndicator x:Name="radBusyIndicator" AnimationType="Animation4" IsBusy="True"/>

    Note: Make sure you also have the required SkiaSharp (v 1.59.3) packages installed as well:

    SkiaSharp (all projects)
    SkiaSharp.Views (all projects except class library)
    SkiaSharp.Views.Forms (all projects)

    If you still experience issues please share the code that you're using, along with details of the target platform, so that 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. Osayed
    Osayed avatar
    7 posts
    Member since:
    Feb 2018

    Posted 14 Jun 2018 in reply to Lance | Team Lead - US DevTools Support Link to this post

    Hello, I do have SkiaSharp on all my projects, also here is the code I use:

    RadBusyIndicator radBusyIndicator = new RadBusyIndicator()
    {
        IsBusy = true,
        Content = new Label() { Text = "This is the content of the RadBusyIndicator control displayed when the indicator is not busy.", TextColor = Color.Black },
            
        AnimationContentWidthRequest = 100,
        AnimationContentHeightRequest = 100,
    };
  4. Osayed
    Osayed avatar
    7 posts
    Member since:
    Feb 2018

    Posted 14 Jun 2018 in reply to Osayed Link to this post

    Hello, I do have SkiaSharp on all my projects, also here is the code I use:

    RadBusyIndicator radBusyIndicator = new RadBusyIndicator()
    {
        IsBusy = true,
        Content = new Label() { Text = "This is the content of the RadBusyIndicator control displayed when the indicator is not busy.", TextColor = Color.Black },
            AnimationType = AnimationType.Animation8,
        AnimationContentWidthRequest = 100,
        AnimationContentHeightRequest = 100,
    }; 
    Also, I am using Xamarin.Forms, and this error happens in both iOS and Android,

    Also when I tried creating a new project It worked on iOS but not on Android when using .NET Standard, but it worked on PCL.
  5. Lance | Team Lead - US DevTools Support
    Admin
    Lance | Team Lead - US DevTools Support avatar
    1047 posts

    Posted 14 Jun 2018 Link to this post

    Hello Osayed,

    Can you also confirm all the SkiaSharp packages are using  v1.59.x and not 1.6? The NuGet package manager can sometimes install the latest even when the dependency is an earlier version.

    Also, double check the RadBusyIndicator Required Telerik Assemblies documentation to insure that you have all the Telerik assemblies referenced:

    RadBusyIndicator Required Telerik Assemblies

    - Portable (or .NET Standard) Project
    Telerik.XamarinForms.Common.dll 
    Telerik.XamarinForms.Primitives.dll 
    Telerik.XamarinForms.SkiaSharp.dll

    - Android Project
    Telerik.XamarinForms.Common.dll 
    Telerik.XamarinForms.Primitives.dll 
    Telerik.XamarinForms.SkiaSharp.dll

    - iOS Project 
    Telerik.XamarinForms.Common.dll 
    Telerik.XamarinForms.Primitives.dll 
    Telerik.XamarinForms.SkiaSharp.dll

    - UWP Project 
    Telerik.XamarinForms.Common.dll 
    Telerik.XamarinForms.Primitives.dll 
    Telerik.XamarinForms.SkiaSharp.dll


    Demo

    I've attached a demo. It's a straightforward "File > New Xamarin.Forms" with "Blank app" and ".NET Standard" selected. After creating the projects, I installed Telerik UI for Xamarin (via the Telerik NuGet server), updated Xamarin.Forms to the latest service release available for that version (3.0 in this case) and added the required NuGet packages (for example Required Android support libraries).

    Here is the entirety of the code:

    XAML

                 xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                 xmlns:local="clr-namespace:NetStandard2_Test"
                 x:Class="NetStandard2_Test.MainPage">
     
        <Grid x:Name="RootGrid"/>
     
    </ContentPage>


    Code-Behind

    using Telerik.XamarinForms.Primitives;
    using Xamarin.Forms;
     
    namespace NetStandard2_Test
    {
        public partial class MainPage : ContentPage
        {
            public MainPage()
            {
                InitializeComponent();
     
                RadBusyIndicator radBusyIndicator = new RadBusyIndicator
                {
                    IsBusy = true,
                    Content = new Label { Text = "This is the content of the RadBusyIndicator control displayed when the indicator is not busy.", TextColor = Color.Black },
                    AnimationType = AnimationType.Animation8,
                    AnimationContentWidthRequest = 100,
                    AnimationContentHeightRequest = 100,
                };
     
                RootGrid.Children.Add(radBusyIndicator);
            }
        }
    }


    Here's the result at runtime:





    As you can see, the control is working as expected. 


    Further Investigation

    If you have any trouble, update my attached demo so that it replicates the issue and send it back to me so that we can investigate the issue 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
  6. Osayed
    Osayed avatar
    7 posts
    Member since:
    Feb 2018

    Posted 15 Jun 2018 in reply to Lance | Team Lead - US DevTools Support Link to this post

    Hello, when I try to build your sample project, I get this error:

    Unable to find package Telerik.UI.for.Xamarin with version (=> 2018.2.516.2)
    - Found 1 version(s) in nuget.org [ Nearest version: 2015.3.1202 ]
    - Found 0 version(s) in Microsoft Visual Studio Offline Packages
    - Found 0 version(s) in Local


    Also, I cannot post a sample project because it says the only allowed extensions are jpg, jpeg, png and gif.
  7. Lance | Team Lead - US DevTools Support
    Admin
    Lance | Team Lead - US DevTools Support avatar
    1047 posts

    Posted 18 Jun 2018 Link to this post

    Hi Osayed,

    Please read the 2nd sentence under "Demo" section in my last reply. I explain that I used the Telerik NuGet server instead of local assemblies (click that link to be brought to the instructions). After you follow the instructions, you'll be able to build!

    For your convenience, here's the link again: Telerik NuGet Server.

    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
  8. Osayed
    Osayed avatar
    7 posts
    Member since:
    Feb 2018

    Posted 19 Jun 2018 Link to this post

    Hello,

    I did read the tutorial and I did everything it said. But I still get the same error and it says "Found 0 version(s) in telerik"

    And If I try to search in the Telerik Nuget I get no result. (It shows no packages).

    I used my Telerik account credentials to login to https://nuget.telerik.com/nuget.

    But it still is empty in both web and Visual Studio. (See attached screenshot)

  9. Lance | Team Lead - US DevTools Support
    Admin
    Lance | Team Lead - US DevTools Support avatar
    1047 posts

    Posted 19 Jun 2018 Link to this post

    Hello Osayed,

    The screenshot you've provided is the expected result. I looked into your account and it seems you do not have a license for UI for Xamarin. This is why you cannot see any results for the specific package in the NuGet feed.

    In fact, you've never started a trial or downloaded UI for Xamarin, where did you get the release you're using? Telerik licensing is per-developer and cannot be shared among many users..

    It is common that a developer uses a license that was purchased by their employer, for this case we have an easy to use portal so that the employer can assign you as the Licensed User of the product. Have the owner of the license take the following steps:

    1 - Go the Managed Licensed Users portal
    2 - Unassign themselves from the license (they will remain the owner and can change users at any time)
    3 - Assign you as the Licensed User using your Telerik Account email address

    Once you obtain a license (trial or paid), you'll be able to then see the Xamarin packages in the Telerik NuGet feed (note that if you are assigned a trial license, you'll need to switch to the Trial NuGet package).

    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
  10. Osayed
    Osayed avatar
    7 posts
    Member since:
    Feb 2018

    Posted 19 Jun 2018 in reply to Lance | Team Lead - US DevTools Support Link to this post

    Hello, I got the release by downloading the trial in another account. I will try downloading it in this account and getting a trial license. 

    Thanks.
  11. Lance | Team Lead - US DevTools Support
    Admin
    Lance | Team Lead - US DevTools Support avatar
    1047 posts

    Posted 19 Jun 2018 Link to this post

    Hello Osayed,

    Yep, that would explain why you're having a problem. Easy fix! Once you start the download, you'll automatically be assigned the trial license.

    Once that happens the NuGet server should show you the following packages:




    If you have any further trouble, let me know.

    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
  12. Rabeeh
    Rabeeh avatar
    1 posts
    Member since:
    Jul 2011

    Posted 16 Sep in reply to Lance | Team Lead - US DevTools Support Link to this post

    We testing this the latest version from Telerik Package

     

    We added this first page, the whole application crashed, plus once we added the Telerik Xamarin the Application increased 100 MB in size

       <primitives:RadBusyIndicator x:Name="radBusyIndicator"
                                         IsVisible="{Binding IsBusy}"
                                         IsBusy="{Binding IsBusy}"
                                         AnimationContentHeightRequest="100"
                                         AnimationContentWidthRequest="100"
                                         AnimationType="Animation4"
                                         AnimationContentColor="LightBlue"
                                         Grid.Row="0"
                                         Grid.RowSpan="2">
                    <primitives:RadBusyIndicator.Content>
                        <Grid BindingContext="{x:Reference Page}"
                          WidthRequest="{Binding Width}"
                          HeightRequest="{Binding Height}" />
                    </primitives:RadBusyIndicator.Content>
                </primitives:RadBusyIndicator>

     

     

  13. Lance | Team Lead - US DevTools Support
    Admin
    Lance | Team Lead - US DevTools Support avatar
    1047 posts

    Posted 16 Sep Link to this post

    Hello Rabeeh,

    Without the crash details, I cannot tell you what went wrong.

    Crash Suspicion

    If I had to guess, it is because the ContentPage you used that code in doesn't have the name "Page". The BindingContext of the BusyIndicator.Content uses an x:Reference, this means the target of that x:Reference must exist, you you'll crash your application.

    To better explain, here's the same code, with the relevant parts highlighted:

    <ContentPage x:Name="Page" ....>
    ....
        <primitives:RadBusyIndicator x:Name="radBusyIndicator"
                                         IsVisible="{Binding IsBusy}"
                                         IsBusy="{Binding IsBusy}"
                                         AnimationContentHeightRequest="100"
                                         AnimationContentWidthRequest="100"
                                         AnimationType="Animation4"
                                         AnimationContentColor="LightBlue"
                                         Grid.Row="0"
                                         Grid.RowSpan="2">
                    <primitives:RadBusyIndicator.Content>
                        <Grid BindingContext="{x:Reference Page}"
                          WidthRequest="{Binding Width}"
                          HeightRequest="{Binding Height}" />
                    </primitives:RadBusyIndicator.Content>
        </primitives:RadBusyIndicator>
    </ContentPage>

    Ultimately, you don't have to take that approach. You can just use it without inner content predefined. Try starting with this, then add features you want afterwards.

    <primitives:RadBusyIndicator  IsVisible="{Binding IsBusy}"  IsBusy="{Binding IsBusy}"/>

    App Size

    Answering your question about app size, it's expected that your package size increased. This is because you're including all the assemblies for all the controls. If you only are using thew RadBusyIndicator, then you can only use the assemblies that the RadBusyIndicator comes in (it is only 3 assemblies, plus SkiaSharp nuget). Please read the RadBusyIndicator Getting Started documentation for more information.

    If you have any further trouble or questions about assemblies, please open a Support ticket here and include all the details about your setup (XF version, target platform version, etc) and we'll be happy to assist with your specific setup.

    Regards,
    Lance | Technical Support Engineer, Principal
    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
Back to Top