我写了一个很简单的android小程序,结果程序没法编译,连启动都启动不了,但是如果我把下面那行( EditText editText = new EditText(this);)注释掉就没有问题,不知道各位能不能指点一下呢,谢谢了,代码如下:
package org.crazyit.io;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.gesture.Gesture;
import android.gesture.GestureLibraries;
import android.gesture.GestureLibrary;
import android.gesture.GestureOverlayView;
import android.gesture.GestureOverlayView.OnGesturePerformedListener;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.Toast;
public class AddGesture extends Activity
{
EditText editText = new EditText(this);
GestureOverlayView gestureView;
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}