How to manually add assemblies for Telerik UI for Xamarin R3 2017?

5 posts, 1 answers
  1. Bill
    Bill avatar
    10 posts
    Member since:
    Nov 2017

    Posted 22 Nov Link to this post

    I am trying to add the assemblies required for the ListView to a Visual Studio Community 2017 project. However, the instructions on the Required Telerik Assemblies page (References after R2 2017 section) do not seem to work for Telerik UI for Xamarin R3 2017. Some of the assemblies listed on the web page are not present in the Telerik UI for Xamarin R3 2017 folder. Can you please provide full instructions on how to manually add the assemblies for Telerik UI for Xamarin R3 2017. Also, on the Register the RadListView Renderer page, the description for Android states:

    "You have to add the following lines to the MainActivity.cs file outside the scope of the namespace just after the using statements:

    [assembly: ExportRenderer(typeof(Telerik.XamarinForms.DataControls.RadListView), typeof(Telerik.XamarinForms.DataControlsRenderer.Android.ListViewRenderer))] "

    However, as you can see below, there is no using statement in the default MainActivity class:

    [Activity (Label = "UpTimeMobile", Icon = "@drawable/icon", Theme="@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
            ScreenOrientation = ScreenOrientation.Portrait)]
        public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
    {
     protected override void OnCreate (Bundle bundle)
     {
      TabLayoutResource = Resource.Layout.Tabbar;
      ToolbarResource = Resource.Layout.Toolbar;
     
         base.OnCreate (bundle);
     
         global::Xamarin.Forms.Forms.Init (this, bundle);
         LoadApplication (new UpTimeMobile.App ());
     }
    }

     

    So where should the line of code go?

  2. Bill
    Bill avatar
    10 posts
    Member since:
    Nov 2017

    Posted 23 Nov in reply to Bill Link to this post

    I tried putting the assembly line in the Android project AssemblyInfo.cs but I now get this error:

    Severity Code Description Project File Line Suppression State
    Error  error: package com.telerik.android.primitives.widget.sidedrawer does not exist
      com.telerik.android.primitives.widget.sidedrawer.DrawerChangeListener UpTimeMobile.Android C:\Users\BC\source\repos\UpTimeMobile\UpTimeMobile\UpTimeMobile.Android\obj\Debug\android\src\mono\com\telerik\android\primitives\widget\sidedrawer\DrawerChangeListenerImplementor.java 8 

  3. Bill
    Bill avatar
    10 posts
    Member since:
    Nov 2017

    Posted 23 Nov in reply to Bill Link to this post

    Also, my minSDK version is 23, target SDK version is also 23.
  4. Bill
    Bill avatar
    10 posts
    Member since:
    Nov 2017

    Posted 23 Nov in reply to Bill Link to this post

    And, this is a shared project. I added the DLLs to the Android project.
  5. Answer
    Lance | Tech Support Engineer, Sr.
    Admin
    Lance | Tech Support Engineer, Sr. avatar
    487 posts

    Posted 24 Nov Link to this post

    Hello Bill,

    In the UI for Xamarin installation folder you'll find sub-folders for each platform, we keep the required assemblies for each platform in one place so that you can select them all at once. Let me take you through the major points.


    Android Assembly References

    Since you don't have a PCL, you only need to use the assemblies in the Android folder:  C:\Program Files (x86)\Progress\Telerik UI for Xamarin R3 2017\Binaries\Android

    Here's a screenshot of the assemblies to add to your Android project's references:






    Renderers

    You no longer need to add any renderer declarations, that was a requirement for older versions of UI for Xamarin (2017.1 and older). All you need are the references.


    Other dependencies

    - Android Support Libraries

    Go here to see the Xamarin.Android.Support dependencies you'll need to add NuGet packages for (if you're not already using them). You stated that you're target 23, make sure your support libraries are targeting at least 23.3.0

    - SkiaSharp

    Several of the controls (Gauge, BusyIndicator, Rating) use SkiaSharp for rendering, you will need to add a the SkiaSharp.Views.Forms 1.59.2 NuGet package.

    Note: If you don't end up using those controls, you can instead reference the Lite assembly to bypass the NuGet package.


    Wrapping Up

    I hope I was able to clear things up. If you have any further trouble, open a support ticket here with the specific details of your project and we'll dig deeper.

    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
Back to Top