解决办法:

  定义一个MotionEvent对象,在ondown里面赋值
   private MotionEvent mLastOnDownEvent = null;


       @Override

        public boolean onDown(MotionEvent arg0) {

         mLastOnDownEvent=arg0;
         return false;
       }

     @Override
     public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
         if(null==e1){
            e1 = mLastOnDownEvent;
              }

          if (e1==null || e2==null){
           return false;

         }
      }