尝试一些到目前为止运行良好的 android 编程。我收到以下错误:
Activity cannot be resolved to a type
The import Activity cannot be resolved
在以下类的前两个导入(活动和捆绑)上:
package com.example.sqlite;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
public class Input extends Activity {
private EditText txtTitle;
private EditText txtURL;
private Button btnOK;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.input);
txtTitle = (EditText) findViewById(R.id.editText1);
txtURL = (EditText) findViewById(R.id.editText2);
btnOK = (Button) findViewById(R.id.button1);
}
}
我已经完成了标准的 ctrl + shift + O,它会自动添加这些导入,但错误仍然存在。我也一遍又一遍地重建它,但没有任何效果。
谁能看到我在这里出错了?