请问Findviewbyid(r.id.button_no1)老是错误,
publicvoid onCreate(Bundle savedInstanceState) {// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.other);
textView =(TextView)findViewById(R.id.myTextView);
button1 =(Button)findViewById(R.id.button_no1); //这里button_no1提示无法解析 myTextView,或者它不是字段
} R.id中没有这个字段 回复 3# 飞凌-chongzi
可我在Other.xml中定义了myTextView和myButton了啊 终于知道问题了,原来包没有引对,:'( 解决了就好
页:
[1]