Forum Xamarin.Forms

Error in 'Standalone_badge_offset.xml'

ErnestJErnestJ AUMember ✭✭✭
edited January 4 in Xamarin.Forms

Hi,

I'm trying to resume Xamarin.Forms project created over a year ago as all development was suspended till now. It targets Android and iOS. iOS part compiles and runs fine, but Android gives this error when building:

'5dp' is incompatible with attribute verticalOffset (attr) float [weak]. ..\obj\Debug\100\lp\102\jl\res\xml\standalone_badge_offset.xml 19

I've tried deleting both bin and obj folders, but same issue. Any idea what is causing it? A year ago same project was running fine.

Inside the file:

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

Best Answer

  • CraigTennillCraigTennill USMember
    Accepted Answer

    I ran into this today when doing some NuGet updates. This error started appearing after updating Xamarin.Google.Android.Material from 1.1.0.5 -> 1.2.1.1

    Reverted back to 1.1.0.5 and error went away

Answers

  • jezhjezh Member, Xamarin Team Xamurai

    Please try to delete bin and obj folders, then restart VS and try again .

    Besides, you can also try to update your nugets and your VS to the latest version.

    If the issue still exists, could you please post a basic demo to github or onedriver so that we can test on our side?


    Xamarin forums are migrating to a new home on Microsoft Q&A!
    We invite you to post new questions in the Xamarin forums’ new home on Microsoft Q&A!
    For more information, please refer to this sticky post.

  • felsfels Member ✭✭
    edited January 4

    Same error. My project worked fine a week ago, so maybe it has to do with the latest Xamarin.Forms update?
    My Visual Studio for mac is up to date, as well as my xamarin.forms and every nuget package that I use.
    Also deleted bin and obj folders, but didn't work

  • ErnestJErnestJ AUMember ✭✭✭

    As per my post, I did delete bin and obj folders, also every package is up to date. Will try to do demo project.

  • CraigTennillCraigTennill USMember
    Accepted Answer

    I ran into this today when doing some NuGet updates. This error started appearing after updating Xamarin.Google.Android.Material from 1.1.0.5 -> 1.2.1.1

    Reverted back to 1.1.0.5 and error went away

  • ErnestJErnestJ AUMember ✭✭✭

    Thanks Craig, I can also confirm reverting back to 1.1.05 fixed the issue.

  • JanVSJanVS Member

    I got the same error since updating Xamarin.Google.Android.Material, and can confirm that after trying several other solutions, reverting back to 1.1.05 fixed the issue.

  • MichaelOBMichaelOB Member ✭✭

    I am not referencing Xamarin.Google.Android.Material directly and I am having the same issue after updating Xamarin.Forms to 5.0.0.2012 from 5.0.0.1931.

  • 4mori4mori Member

    @MichaelOB said:
    I am not referencing Xamarin.Google.Android.Material directly and I am having the same issue after updating Xamarin.Forms to 5.0.0.2012 from 5.0.0.1931.

    I'm having the same problem (5.0.0.2012) and I'm going crazy and can't compile and fix anymore. Whenever a new version comes out it is always an obstacle course. It is unnerving

  • RazorAntRazorAnt USInsider, University ✭✭
    edited April 7

    Had same issue. Cleaned bin and obj, but didn't help.

    Rolled back Forms and Forms Visual Material from 5.0.0.2012 to 5.0.0.1931 and it fixed the 3 crazy errors.

Sign In or Register to comment.