stormlion227 / ImageCropper.Forms

Xamarin.Forms plugin to crop and rotate photos.
MIT License
84 stars 59 forks source link

App crashes on creating new instance of ImageCropper #38

Open ederjbezerra opened 3 years ago

ederjbezerra commented 3 years ago

When calling

new ImageCropper() { PageTitle = "Cut an image", AspectRatioX = 1, AspectRatioY = 1, CropShape = ImageCropper.CropShapeType.Rectangle, SelectSourceTitle = "Select a file", TakePhotoTitle = "Take a picture", PhotoLibraryTitle = "Pic gallery", Success = (imageFile) => { Device.BeginInvokeOnMainThread(() => { imageView.Source = ImageSource.FromFile(imageFile); }); } }.Show(this);

This exception is threw:

Method not found: System.Threading.Tasks.Task`1 Plugin.Media.Abstractions.IMedia.TakePhotoAsync(Plugin.Media.Abstractions.StoreCameraMediaOptions)

ImageCropper 1.0.6 Xam.Plugin.Media 5.0.1 Xamarin.Android.Support.* 28.0.0.3 Xamarin.Essentials 1.5.4.2 Xamarin.Forms 4.7.0.1080

krunal66nizama commented 3 years ago

having same issue

ederjbezerra commented 3 years ago

@krunal66nizama fixed only by installing ImageCropper.Forms.Fix on nuget

krunal66nizama commented 3 years ago

@ederjbezerra thanks

ershovd commented 3 years ago

I also have the same issue, have tried ImageCropper.Forms.Fix nuget but it didn't help. any ideas on how to fix this?

eyeveye commented 3 years ago

Having the same issue. Installing ImageCropper.Forms.Fix on nuget doesnt fix. Any idea?

krunal66nizama commented 3 years ago

try this nuget ImageCropper.Forms.Fix.v3 link : https://www.nuget.org/packages/ImageCropper.Forms.Fix.v3/

eyeveye commented 3 years ago

try this nuget ImageCropper.Forms.Fix.v3 link : https://www.nuget.org/packages/ImageCropper.Forms.Fix.v3/

This package even get the "Permission" package typo:

All Frameworks Plugin.Persmissions (>= 6.0.1) Xam.Plugin.Media (>= 5.0.1) Xamarin.Forms (>= 4.6.0)

krunal66nizama commented 3 years ago

try this nuget ImageCropper.Forms.Fix.v3 link : https://www.nuget.org/packages/ImageCropper.Forms.Fix.v3/

This package even get the "Permission" package typo:

All Frameworks Plugin.Persmissions (>= 6.0.1) Xam.Plugin.Media (>= 5.0.1) Xamarin.Forms (>= 4.6.0)

download project from that git , and run that code , it will work in android , but still circular crop will not work

ederjbezerra commented 3 years ago

try this nuget ImageCropper.Forms.Fix.v3 link : https://www.nuget.org/packages/ImageCropper.Forms.Fix.v3/

This package even get the "Permission" package typo: All Frameworks Plugin.Persmissions (>= 6.0.1) Xam.Plugin.Media (>= 5.0.1) Xamarin.Forms (>= 4.6.0)

download project from that git , and run that code , it will work in android , but still circular crop will not work

Unable to find package Plugin.Persmissions. No packages exist with this id in source(s): nuget.org

I think the problem is Permissions was wrote wrong. I have Plugin.Permissions installed but can't install ImageCropper because it expects Plugin.Persmissions. How can I solve that?