好的,这是我单个java文件中的代码:
package text.test;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Button;
import android.widget.EditText;
public class TexttestActivity extends Activity {
/** Called when the activity is first created. */
Button btn;
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
EditText piaf=(EditText)findViewById(R.id.fieldd);
piaf.setText("Inception" + "The lord of the Rings");
}
}
我一直收到这个错误! WTF错了?!我试图谷歌寻求答案但没有任何效果!
答案 0 :(得分:0)
应
EditText piaf=(EditText)findViewById(R.id.fieldd);
是
EditText piaf=(EditText)findViewById(R.id.field);
...