Forum Xamarin Cross Platform with Xamarin

Mvvmcross: Cannot convert from 'MonoTouch.UIKit.UIImage' to 'MonoTouch.Foundation.NSCoder'

I got the following error:

Error 3 Argument 1: cannot convert from 'MonoTouch.UIKit.UIImage' to 'MonoTouch.Foundation.NSCoder' D:\dropbox\han\src\testHttp\testHttp.Touch\LinkerPleaseInclude.cs 43 43 testHttp.Touch

Anyone ideas? I'm using the latest alpha releases from Xamarin and Mvvmcross from Nuget

Regards,
Arjan

Posts

  • ArjanvanSomerenArjanvanSomeren NLMember

    Forget this question, it works now, don't know why......

  • GabiGabi DEMember ✭✭

    I have the same issue. Any solutions?

  • ArjanvanSomerenArjanvanSomeren NLMember

    I (re) installed all the alpha versions and suddenly it works. Still don't know why....

  • Pff, after installing everything again due to PCL problems I have the problem again and cannot resolve it. Has anyone the same problem?

  • WayneKembleWayneKemble USMember

    Yes, now seeing the same when adding a new iOS Universal project to my solution...

    Error 1 The best overloaded method match for 'MonoTouch.UIKit.UIImage.UIImage(MonoTouch.Foundation.NSCoder)' has some invalid arguments B:\src\CrossPlatform\MyProject.Touch\LinkerPleaseInclude.cs 43 31 MyProject.Touch

    Error 2 Argument 1: cannot convert from 'MonoTouch.UIKit.UIImage' to 'MonoTouch.Foundation.NSCoder' B:\src\CrossPlatform\MyProject.Touch\LinkerPleaseInclude.cs 43 43 MyProject.Touch

    Cannot resolve constructor UIImage(MonoTouch.UIKit.UIImage)

  • AustinFoxleyAustinFoxley USMember ✭✭
    edited August 2013

    You can also simply open up LinkerPleaseInclude.cs and change this:

    public void Include(UIImageView imageView) { imageView.Image = new UIImage(imageView.Image); }

    to:

    public void Include(UIImageView imageView) { imageView.Image = new UIImage(imageView.Image.CGImage); }

  • Thanks James!

Sign In or Register to comment.