Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GestureDetector cannot be resolved to a type

I'm learning to use GestureDetector and following android's official developer's guide, but when I try to run a snippet of code I met a problem..

public class MainActivity extends Activity implements 
        GestureDetector.OnGestureListener,
        GestureDetector.OnDoubleTapListener{}

Here Eclipse gives me a error: GestureDetector cannot be resolved to a type, I tried to fixed it by cleaning and rebuilding, re-import android support library and including it in the build path and pressing ctrl+shift+o as well..but my Eclipse is just not letting this error go away...

Please give me some advice and I really appreciate that.

P.S., I'm following codes on Android Gesture Detector Training

like image 732
Sherman_Meow Avatar asked Dec 25 '22 18:12

Sherman_Meow


1 Answers

try writing this code in your activity

  import android.view.GestureDetector;

This will do the trick.

like image 149
n.arrow001 Avatar answered Dec 31 '22 14:12

n.arrow001