We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Android build failing with "Resource.xxx" does not contain a definition... errors

Made a very simple grid test content page, it builds and runs on iOS ok but the Android build gives me 150+ errors all looking like this:

Error CS0117 'Resource.Attribute' does not contain a definition for 'mediaRouteSettingsDrawable' StickBuddy.Droid D:\XPDev\Mobile\StickBuddyForms\StickBuddy\StickBuddy\StickBuddy.Droid\Resources\Resource.Designer.cs 220 Active

Error CS0117 'Resource.Color' does not contain a definition for 'design_textinput_error_color' StickBuddy.Droid D:\XPDev\Mobile\StickBuddyForms\StickBuddy\StickBuddy\StickBuddy.Droid\Resources\Resource.Designer.cs 370 Active

etc... 

I've checked and double checked the reference list for Android and it's correct according to your docs - I've downloaded the latest available off the site - not sure what I'm missing here... 


12 Replies

HN Harikrishnan N Syncfusion Team June 14, 2016 10:44 AM UTC

Hi Jeff,

Thank you for using Syncfusion Products.

This error usually occurs when there is a mismatch of Xamarin NuGet packages between your sample and SfDataGrid assemblies. Our 14.1.0.46 version of release supports Xamarin NuGet of version 2.1.

Xamarin recommends the NuGet packages to be inline in order to avoid potential issues. So please uninstall all the other version of NuGets and use 2.1 version in the PCL and the renderer projects of your sample. Also ensure no other version of Xamarin NuGets were installed in any of your PCL and renderer projects. Clean and rebuild the project before running it. You can see the software requirements of Syncfusion controls from our read me information.

ReadMe link: https://s3.amazonaws.com/files2.syncfusion.com/Installs/v14.1.0.46/ReadMe/Xamarin_Forms.html 

Moreover, our upcoming 2016 Volume 2 release supports 2.2 version of NuGet which is planned to be released by the end of next week. We appreciate your patience until then if you prefer to run SfDataGrid with the latest version of Xamarin.

Regards,
Harikrishnan 
 



JL Jeff Lindborg June 14, 2016 04:17 PM UTC

ok - I went back and ripped out 2.2 from all projects, cleaned it and installed the latest version of 2.1 of Xamarin - it all compiles properly and the charts views all display properly however I can get grids to display at all (the view form doesn't even load) - odd because no error/exception is thrown and nothing kicks out into the debug.  I'm going to try building a clean project from scratch and see if I can get grids to show and figure out what's different in my project.  Either that or just hang tight till you guys put out your updated version for 2.2 and then come back to this and take another run at it.



JL Jeff Lindborg June 14, 2016 07:51 PM UTC

Spent a fair amount of time banging heads with this today.  Short version is if I remove SyncFusion.DataGrid.XForms.Android.dll from the references list in my Android project, the grid view page loads with the correct text and images formatted correctly, just not as an actual list/grid (i.e. it doesn’t scroll, has no cells and such) – so the DB fetch and such are all working correctly, it’s just the grid rendering is broken somehow such that when it’s called the view fails to show at all.  I tried downloading 14.1.0.46 manually and setting the DLL dependencies to the install folder as well as using NuGet to configure all the projects (which works fine for iOS, PCL and UWP) – same results.

So at this point I’m unsure what dependencies to check – there’s no errors and nothing spits out in the debug window giving me a hint as to the source of the problem.

At this point I’ll continue testing the grid in iOS only – charts work fine on all platforms so I can make some progress there at any rate.  Hopefully after the next update some of this will be a bit smoother and I can update to Xamarin forms 2.2 and move forward.



HN Harikrishnan N Syncfusion Team June 14, 2016 08:22 PM UTC

Hi Jeff,

We are analyzing on your problem. We were able to get the grid working properly in Android without any problems. We would probably get back to you with a working example along with a video reference for your better understanding before the EOD. Meanwhile, you can download a simple getting started demo for Xamarin.Forms from the below link. You can also refer our getting started section of UG for more details.

Sample link: https://s3.amazonaws.com/files2.syncfusion.com/Xamarin.Forms/Samples/DataGrid_GettingStartedForms.zip
UG link: http://help.syncfusion.com/xamarin/sfdatagrid/getting-started

In case, if you are loading the grid inside a StackLayout please refer the below KB link to get it working.
KB link: https://www.syncfusion.com/kb/6169/how-to-load-sfdatagrid-in-a-stacklayout

Regards,
Harikrishnan
 
 



SL Sathya Lakshmanan Syncfusion Team June 15, 2016 03:50 PM UTC

Hi Jeff,

We have checked your query with use of 14.1.0.46 version release supports Xamarin NuGet of version 2.1, but we were unable to reproduce the issue from our side. So as we had mentioned earlier, we have attached a sample and output Screenshot deployed on Android for your reference and you can download the same from the below link.

Sample link: http://www.syncfusion.com/downloads/support/forum/124546/ze/DataGridSample1486650527  

Regards,
Sathya 



JL Jeff Lindborg June 15, 2016 04:42 PM UTC

well... I downloaded the sample you guys made - removed all but the PCL and Android projects, replaced the references to the correct DLLs, it builds with no errors but when launched on Android (my physical pad running 4.4 or an emulator running Marshmallow) I get this in the debug window when the main screen launches:

06-15 09:40:05.542 D/Mono    (16323): Assembly Ref addref Syncfusion.SfDataGrid.XForms.Android[0x6d4840d0] -> System[0x7441fb20]: 11
Unhandled Exception:
System.ArgumentException: Set Method not found for 'Element' 

so... something's very odd here.  I need to go to work but I'll circle back around on this later today.

thanks

-Jeff


JL Jeff Lindborg June 15, 2016 04:49 PM UTC

oh, and I did remove the references and use NuGet on the PCL and Android projects as well to make sure the DLLs being referenced were good - same results.


AC Abraham Chacon June 16, 2016 05:45 AM UTC

Hello there.

I have the very same issue and I'm using the Xamarin.Forms version recommended on the README page, which is Xamarin.Forms 2.1.0.6529 (currently using Essential Studio for Xamarin 14.1.0.46 and Visual Studio 2015 Community Edition Update 2).
The ArgumentException shows up when I assign the SfDatagrid object to the Content property of any ContentPage or when it's added to a Children collection of any Layout, but there are no compile errors.

Attachment: App9_c55821e8.rar


SL Sathya Lakshmanan Syncfusion Team June 16, 2016 02:13 PM UTC

Hi Jeff

Sorry for the inconvenience caused.

We have analyzed your query and we were able to reproduce the issue. We have logged an issue report for this. We will fix this issue internally and the fix for the reported issue will be available in our 2016 Volume 2 Main Release which is scheduled for release next week. We appreciate your patience until then.

Regards,
Sathya
 



SL Sathya Lakshmanan Syncfusion Team June 16, 2016 05:06 PM UTC

Hi Abraham,

Sorry for the inconvenience caused.

We have analyzed your query and we were able to reproduce the issue. We have logged an issue report for this. We will fix this issue internally and the fix for the reported issue will be available in our 2016 Volume 2 Main Release which is scheduled for release next week. We appreciate your patience until then.

Regards,
Sathya




AC Alejandro Cons October 20, 2016 05:32 PM UTC

Hello, 
I'm getting the same error in particular with the following properties:
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.Ascending = global::SampleBrowser.Droid.Resource.Drawable.Ascending;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.Descending = global::SampleBrowser.Droid.Resource.Drawable.Descending;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.DragDown = global::SampleBrowser.Droid.Resource.Drawable.DragDown;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.DragUp = global::SampleBrowser.Droid.Resource.Drawable.DragUp;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.error2 = global::SampleBrowser.Droid.Resource.Drawable.error2;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.FirstPageIcon = global::SampleBrowser.Droid.Resource.Drawable.FirstPageIcon;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.GroupCollapse = global::SampleBrowser.Droid.Resource.Drawable.GroupCollapse;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.GroupExpander = global::SampleBrowser.Droid.Resource.Drawable.GroupExpander;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.LastPageIcon = global::SampleBrowser.Droid.Resource.Drawable.LastPageIcon;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.NextPageIcon = global::SampleBrowser.Droid.Resource.Drawable.NextPageIcon;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.PrevPageIcon = global::SampleBrowser.Droid.Resource.Drawable.PrevPageIcon;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.Sort = global::SampleBrowser.Droid.Resource.Drawable.Sort;
global::Syncfusion.SfGridConverter.Android.Resource.Drawable.SortDescending = global::SampleBrowser.Droid.Resource.Drawable.SortDescending;

The issue It seems targeted to the SfGridConverter specifically 

I am trying to compila using Syncfusion Volume 3 v14.3.0.49 with Xamarin v2.3.2.127.
In the web site : https://s3.amazonaws.com/files2.syncfusion.com/Installs/v14.3.0.49/ReadMe/Xamarin_Forms.html 
It explains that it should be compatible with Xamarin 2.3 and above.



DS Divakar Subramaniam Syncfusion Team October 21, 2016 01:07 PM UTC

Hi Alejandro, 
 
 
We have checked your query. This error usually occurs when there is a mismatch of Xamarin NuGet packages between your sample and SfDataGrid assemblies. Our 14.3.0.49 version of release supports Xamarin NuGet of version 2.3.0.49.

Xamarin recommends the NuGet packages to be inline in order to avoid potential issues. So please uninstall all the other versions of NuGets and use 2.3.0.49 version in the PCL and the renderer projects of your sample. Also, ensure no other version of Xamarin NuGets were installed in any of your PCL and renderer projects. Clean and rebuild the project before running it.
 
In our site, we have mentioned that 14.3.0.49 version supports 2.3 and above Nuget version. But that is for all of our controls except SfDataGrid. SfDataGrid supports only 2.3.0.49 version of Nuget version since our SfDataGrid developed directly in Xamarin.Forms. So, please install 2.3.0.49 version of Nuget in your solution and check whether the issue is still reproduced on your side. If it so, please do revert us. 
 
Regards, 
Divakar. 


Loader.
Live Chat Icon For mobile
Up arrow icon