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

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

4 Answers 660 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 22 Nov 2017, 05:50 PM

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?

4 Answers, 1 is accepted

Sort by
0
Bill
Top achievements
Rank 1
answered on 23 Nov 2017, 10:04 AM

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 

0
Bill
Top achievements
Rank 1
answered on 23 Nov 2017, 10:17 AM
Also, my minSDK version is 23, target SDK version is also 23.
0
Bill
Top achievements
Rank 1
answered on 23 Nov 2017, 10:19 AM
And, this is a shared project. I added the DLLs to the Android project.
0
Accepted
Lance | Manager Technical Support
Telerik team
answered on 24 Nov 2017, 08:44 PM
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
Tags
General Discussions
Asked by
Bill
Top achievements
Rank 1
Answers by
Bill
Top achievements
Rank 1
Lance | Manager Technical Support
Telerik team
Share this question
or