title: How to solve gesture that cause error (caused by java.lang.NullpointerException)?
body: <pre><code>public class GusterActivity extends Activity implements OnGesturePerformedListener
   {
    TextView txtmsg;
    TextView txtwrt;
    private GestureLibrary gesturelib;
    /** Called when the activity is first created. */
    @Override
     public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      GestureOverlayView gestureoverlayview=new GestureOverlayView(this);
      View inflate=getLayoutInflater().inflate(R.layout.main,null);
      gestureoverlayview.addView(inflate);
      gestureoverlayview.addOnGesturePerformedListener(this);
      gesturelib= GestureLibraries.fromRawResource(this,R.raw.gestures);
      if(gesturelib.load()){
          finish();
      }
      setContentView(gestureoverlayview);
  }
  
  public void onGesturePerformed(GestureOverlayView overlay, Gesture gesture) {
      ArrayList&lt;Prediction&gt; predictions = gesturelib.recognize(gesture);
      for(Prediction prediction : predictions){
          if(prediction.score&gt;1.0){
  
                  Toast.makeText(this,prediction.name,Toast.LENGTH_SHORT);
  
  
  
          }
      }
  }
  </code></pre>