"Resource" contains no Definition for "Animation"

13,738

Solution 1

if

Resources\Resource.designer.cs(29,110): error CS0117: '.........' does not contain a definition
 for 'Animation' [C:\......Droid.csproj]

*5000

Looks familiar Im not sure its a Telerik issue. Just updated a project from forms Library 1.5.0.6447 to 1.5.1.6468 and got a stck of them. Could be we'll have to wait on a Xamarin.Forms Fix.

EDIT Finally found the answer and if you haven't as well I'm guessing its the same. Open up your Android SDK manager and Install the Android 6.0 (API 23). If that doesn't work Heck just install everything. The dependency stack with Android appears to be a little messy. Either Telerik or Xamarin.Forms likely has a dependency on a specific Android SDK that you don't have installed.

Update on this one: Time moves on and this error seems to be a catchall for a variety of issues. Had the same problem recently and Removing all of the Xamarin Nuget packages and re adding them to the project fixed it. Thought it might be worth adding as another possible solution. Other things that have fixed this for me in the past. - Rebooting - Restarting the IDE - Cleaning and Recompiling the App. I didn't mention those earlier as I assume if your here you've already tried that :D

Solution 2

'Resource.Animation' does not contain a definition for projectName

'Resource.String'does not contain a definition for projectName

'Resource.*' if you messed up Resource.Designer.cs file, just deleting the Resource.Designer.cs file and doing a clean and rebuild that did the trick.

Steps:

  1. Delete the Resource.Designer.cs
  2. Clean the project
  3. Rebuild the project
Share:
13,738
Dbl
Author by

Dbl

Updated on June 17, 2022

Comments

  • Dbl
    Dbl almost 2 years

    So i'm currently in the process of evaluating trials of Xamarin.Forms and UI for XamarinForms from telerik.

    Unfortunately once i link the libraries to the telerik dll's i'm getting a messed up Resource.Designer.cs file.

    I'm getting 5000 errors of "Resource" contains no Definition for "Animation". (also Resource.Drawable, Resource.Style, Styleable,...) from code like this:

        public static void UpdateIdValues()
        {
            global::Telerik.XamarinForms.ChartRenderer.Android.Resource.Animation.abc_fade_in = global::MyNamespace.XamarinForms.Droid.Resource.Animation.abc_f
            global::Telerik.XamarinForms.ChartRenderer.Android.Resource.Animation.abc_fade_out = global::MyNamespace.XamarinForms.Droid.Resource.Animation.abc_fade_out;
            ....
    

    Does that ring a bell to anyone?

    Already started a ticket on telerik but i guess someone else may run into the same issue and might need a fix.

  • Dbl
    Dbl over 8 years
    so you're saying the problem might not occur because telerik did something wrong, but because something was wrong in the first place and telerik just made the issue surface? does that happen a lot with xamarin? curious since that would be interesting for evaluation too.
  • Dbl
    Dbl over 8 years
    also: are you talking about librarys like Xamarin.Forms.Platform.Android? Those are on 1.3.3.0 for me
  • David
    David over 8 years
    First time Ive seen it. However at the same time Xamarin is sitting on top of a fairly complex stack. There is the Mono Framework the Android SDK's and the Xamarin Forms Libraries and that is just for Android. There's more for IOS and WP. Put that all together and its an awful lot of complexity. Add Telerik and other third party controls and components into the mix. Multiple that by the volatility of the Mobile/Tablet market space and the diversity of the hardware and you can't expect anything that's trying to accomplish that much not to hit a snag occasionally.
  • Dbl
    Dbl over 8 years
    yup, not looking for someone to blame really. i'm still somewhat impressed they even managed to create such a product and despite my current issues it seems to work rather nicely so far.
  • David
    David over 8 years
    1.3.3.0 sounds a bit old. You might want to try updating your Nuget packages. Could be you just need to update. Might be completely unrelated to what I've fighting. Worth a try anyway. As an aside updates to the packages come out almost daily Anymore the first thing I do when I open the IDE each day is check for updates.
  • Dbl
    Dbl over 8 years
    tried 1.5.0.6447 since it worked for you before. no success unfortunately. i guess it's something else
  • David
    David over 8 years
    Not sure looks like some others might be seeing this as well. Out a bug report in at. bugzilla.xamarin.com/show_bug.cgi?id=35074
  • David
    David over 8 years
    Xamarin Closed the bug report after a week and just said to restart my UI and put in a new report if I still had issues. But I got it figured out.