AlertDialog.Builder builder = new AlertDialog.Builder(MainDialog.this);
搞不清楚MainDialog.this这个是个什么对象,有的是
AlertDialog.Builder builder = new AlertDialog.Builder(this);
只要一创建builder对象,虚拟设备中就提示:
The application Test2New(process com.zh2)has stopped unexpectedly.please try again;
什么突发事件停止,
搞不清楚MainDialog.this这个是个什么对象,有的是
AlertDialog.Builder builder = new AlertDialog.Builder(this);
只要一创建builder对象,虚拟设备中就提示:
The application Test2New(process com.zh2)has stopped unexpectedly.please try again;
什么突发事件停止,
解决方案 »
- 新手,请大神帮忙解决一个jni调用问题.
- pad机器与android模拟器分辨率一样,但显示效果不一样
- Android:TextView:同时调用setLines与setMaxLines(或者setLines与setMinLines)方法均有问题
- 【求助】打开其他程序后,类被重置!!!
- 高手请进!
- emulator: ERROR: no search paths found in this AVD's configuration.
- andorid下Google地图V2 出现这个是什么情况
- 如何从我的应用程序中关闭 刚才 调出来的setting
- 求助:如何动态修改ListVIew中每个Item的值
- java.lang.IllegalStateException: The content of the adapter has changed but List
- android 中java层怎么在新建的分区上存储数据?
- 关于android的布局问题
警告提示
LZ只要记住,如果在匿名类的方法中要调用上一层的对象,就用对象.this.XXX
AlertDialog.Builder builder = new AlertDialog.Builder(MainDialog.this);
//MainDialog是当前类名称;MainDialog.this理解成一个“上下文环境”
//你可以把AlertDialog.Builder builder = new AlertDialog.Builder(this); 中的this换成MainDialog.this
Test2NewActivity这个是我的类,我改了,编译通过了,但是还是提示The application Test2New(process com.zh2)has stopped unexpectedly.please try again;
想自杀了,抓狂中......