Completed
Last Updated: 24 Feb 2021 13:03 by ADMIN
Release R1 2021 SP1
Philip Allwright
Created on: 22 Jan 2021 09:29
Category: UI for Xamarin
Type: Bug Report
1
Chart: [Android] Project could not be compiled when the latest version of Xamarin.Google.Android.Material is referenced

When building against XF5 and after migrating a project you can get the following error:-

Severity Code Description Project File Line Suppression State
Error failed linking file resources. App1.Android
Error '5dp' is incompatible with attribute verticalOffset (attr) float [weak]. App1.Android
Error '10dp' is incompatible with attribute horizontalOffset (attr) float [weak]. App1.Android

It appears to be a conflict between

<PackageReferenceInclude="Xamarin.Google.Android.Material"Version="1.2.1.1" />

and Telerik assemblies.

If a dummy app is built with that Nuget it all works fine until the Nuget

<PackageReference Include="Telerik.UI.for.Xamarin" Version="2021.1.119.1" />

is added.

So you can have one or the other but not both.

Please see this GitHub thread where its discussed more and a sample app is posted.

(I am user Gmotagi in it)

https://github.com/xamarin/Xamarin.Forms/issues/13303

 

 

 

 
4 comments
ADMIN
Georgi
Posted on: 17 Feb 2021 08:56

Hi,

This item is available in latest internal build - LIB 2021.1.216 (16/2/2021)) and it will be also available in the next official release. You can find the LIB as a prerelease nuget or download the assemblies from your account.

Regards,
Georgi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Didi
Posted on: 28 Jan 2021 06:58

Hi Philip,

I am writing to let you know that we will fix on our side the compile-time errors 5dp and 10dp. The item status is "In Development". If passing testing, the fix will be included in the next minor release/Service Pack.

The item status will be updated accordingly.

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Didi
Posted on: 25 Jan 2021 16:31

Hi Philip,

We have identified the problem, it is a conflict of object types in the Xamarin.Google.Android.Material package against external definitions.

The error with the 5dp and 10 dp occurs because the native Telerik android Chart control has the following attributes:


     <attr name="horizontalOffset" format="float" />
     <attr name="verticalOffset" format="float" />

 

one of the attributes being used in the latest version of Xamarin.Google.Android.Material (notice the 5dp and 10dp string values):

<badge xmlns:app="http://schemas.android.com/apk/res-auto"
    app:maxCharacterCount="2"
    app:horizontalOffset="10dp"
    app:verticalOffset="5dp"/>

Workaround:

downgrade the Xamarin.Android.Material version to 1.1.0.5 version. It seems the issue happens with 1.2.1.1 version of Xamarin.Android.Material.

Another solution if you want to use version 1.2.1.1 of Xamarin.Android.Material, is to not use the complete Telerik UI for Xamarin NuGet because it refers the Chart dll. -> So you can install the separate nuget packages exclude the NuGet for the chart control. 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

ADMIN
Didi
Posted on: 22 Jan 2021 17:11

Hello Philip,

Thank you for reporting this issue. I changed the item status to "Under Review".

We have reproduced the errors on our side. The issue was escalated to the development team and I can assure you that the team is researching the case further. 

I will send a follow-up message here once I have more information to share. In the meantime, your patience is highly appreciated. 

Regards,
Didi
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.