Reputation: 55
I'm trying to follow the FirstDemo tutorial from Stuart's N+1 on Xamarin Studio.
I'm getting the following exception:
[mono] Unhandled Exception:
[mono] Cirrious.CrossCore.Exceptions.MvxException: Error finding resource ids for MvxBinding - please make sure ResourcesToCopy are linked into the executable ---> System.InvalidCastException: Cannot cast from source type to destination type.
[mono] at Cirrious.MvvmCross.Binding.Droid.ResourceHelpers.MvxAndroidBindingResource..ctor () [0x000ed] in /Users/stuartlodge/Documents/GitHub/Mvx/MvvmCross/Cirrious/Cirrious.MvvmCross.Binding.Droid/ResourceHelpers/MvxAndroidBindingResource.cs:57
[mono] --- End of inner exception stack trace ---
[mono] at Cirrious.MvvmCross.Binding.Droid.ResourceHelpers.MvxAndroidBindingResource..ctor () [0x00142] in /Users/stuartlodge/Documents/GitHub/Mvx/MvvmCross/Cirrious/Cirrious.MvvmCross.Binding.Droid/ResourceHelpers/MvxAndroidBindingResource.cs:72
[mono] at Cirrious.MvvmCross.Binding.Droid.ResourceHelpers.MvxAndroidBindingResource.Initialise () [0x0000b] in /Users/stuartlodge/Documents/GitHub/Mvx/MvvmCross/Cirrious/Cirrious.MvvmCross.Binding.Droid/ResourceHelpers/MvxAndroidBindingRe
I imported the following references from XS-iOS-Mac/bin/Release/Mvx/Droid/
:
And before you ask, yes I have MvxBindingAttributes.xml
on Resources/values
directory, and yes, it is marked as Android Resource
.
Thanks in advance.
Upvotes: 0
Views: 1217
Reputation: 55
I'm not very sure about how I managed to fix it.
I probably got the binaries from the VS2012
directory instead of XS-iOS-Mac
. I had a variety of problems about choosing the right binaries source.
Even I'm working on a Mac, sometimes many problems get solved just by referencing the VS2012
ones. I think there is a pattern on these dependencies, but until now I got my tutorials working just by trial and error.
Upvotes: 1
Reputation: 66882
The error message is generated when the resourceids can't be found.
These resourceids should be generated by the android and xamarin tools in the Resource class in the same namespace as the Setup file.
Try searching through the generated resource file - are the mvx constants there? Is the namespace correct?
If that doesn't help, maybe compare your code against the finished reference solution on github. Or maybe also try one of the other n+1 videos which uses xamarin studio on the mac.
Upvotes: 0