Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Resource" contains no Definition for "Animation"

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.

like image 271
Dbl Avatar asked Oct 19 '15 17:10

Dbl


2 Answers

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

like image 137
David Avatar answered Oct 27 '22 17:10

David


'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
like image 31
bCliks Avatar answered Oct 27 '22 19:10

bCliks