android菜鸟询问
1.在.add(R.id.container,newPlaceholderFragment()).commit();提示containercannotberesolved...
1.在.add(R.id.container, new PlaceholderFragment()).commit();提示container cannot be resolved or is not a field,这个是没有添加什么包进去吗?
2.在mButton1.setOnClickListener(new OnClickListener(){ 提示:Multiple markers at this line
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (new
OnClickListener(){}),这个是什么原因呢?书上只是说输入就可以,但是我为什么会出现这样的错误呢?
3.在public void onClick(View v){ 也出现The method onClick(View) of type new OnClickListener(){} must override or implement a supertype method
4. Intent _intent=new Intent(MainActivity.this,ActivityB.class);提示:Multiple markers at this line
- Intent cannot be resolved to
a type
以上问题让小弟有点困扰 不知如何下手!望大神指点。。。 展开
2.在mButton1.setOnClickListener(new OnClickListener(){ 提示:Multiple markers at this line
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the arguments (new
OnClickListener(){}),这个是什么原因呢?书上只是说输入就可以,但是我为什么会出现这样的错误呢?
3.在public void onClick(View v){ 也出现The method onClick(View) of type new OnClickListener(){} must override or implement a supertype method
4. Intent _intent=new Intent(MainActivity.this,ActivityB.class);提示:Multiple markers at this line
- Intent cannot be resolved to
a type
以上问题让小弟有点困扰 不知如何下手!望大神指点。。。 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询