Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

TapGestureRecognizer is obsolete

$
0
0

I am trying to build my deployable Android application package file (.apk) and I am getting the following error during the package build:

Xamarin.Forms.TapGestureRecognizer.TapGestureRecognizer(System.Action<Xamarin.Forms.View,object>)' is obsolete: 'Obsolete in 1.0.2. Use Command instead

This is showing up as a warning in the Visual Studio Error List when I build the solution. How do I resolve this issue?

Here is the code snippet in question:

myImage = new Image { Aspect = Aspect.AspectFit, Source = "myImage.png" };

myImage .GestureRecognizers.Add(new TapGestureRecognizer((view, args) => {
                Navigation.PushAsync(new WebPage("Google App Store", "https://play.google.com"));
}));

Viewing all articles
Browse latest Browse all 58056

Trending Articles