android程序在虚拟机上运行出错 android,java 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 删除以下代码:textView = (TextView)findViewById(R.id.textView);textView.setText("Hello Dylan");修改fragment的oncreateview@Overridepublic View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {View rootView = inflater.inflate(R.layout.fragment_main, container,false);TextView textView = (TextView)rootView.findViewById(R.id.textView);textView.setText("Hello Dylan");return rootView;}} 不行,代码编译时会报错,说Cannot make a static reference to the non-static field textView后来我把textView属性改为static变量,显示没有出错感谢啊 不行,代码编译时会报错,说Cannot make a static reference to the non-static field textView后来我把textView属性改为static变量,显示没有出错感谢啊 做一个登录器 删除不了SIM卡的联系人 求助求助 请问在Activity中如何终止由另一个Activity启动的服务? Android应用程序利用USB和外部一个展台设备通讯 求助 学习路线的问题。。三大框架或者Android??? 快速APP开发平台类似追信是怎么生成APP的? 更换Android开机图片(小企鹅)那个logo 反编译改包名的问题 求实现的思路 android 小程序,求大神调试,,高分 httppost chunked编码问题
textView = (TextView)findViewById(R.id.textView);
textView.setText("Hello Dylan");修改fragment的oncreateview
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {View rootView = inflater.inflate(R.layout.fragment_main, container,
false);
TextView textView = (TextView)rootView.findViewById(R.id.textView);
textView.setText("Hello Dylan");
return rootView;
}
}
后来我把textView属性改为static变量,显示没有出错感谢啊
后来我把textView属性改为static变量,显示没有出错感谢啊