首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Android常见有关问题及其解决方法

2012-07-29 
Android常见问题及其解决办法今天在向模拟器部署运行项目时碰到下面的异常:?[2012-02-15 13:22:14 - Devic

Android常见问题及其解决办法

今天在向模拟器部署运行项目时碰到下面的异常:

?

[2012-02-15 13:22:14 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host

[2012-02-15 13:22:14 - Unexpected error while launching logcat. Try reselecting the device.] An existing connection was forcibly closed by the remote host

java.io.IOException: An existing connection was forcibly closed by the remote host

两种解决办法:1、在命令行下执行如下命令:adb kill-server、adb kill-server2、在任务管理器中,强制关闭adb.exe,然后重启模拟器
1 楼 cyhcheng 2012-02-15   运行项目碰到下面的异常:
E/dalvikvm(293): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
这种情况通常是代码问题,比如上下文环境的问题,如下面的代码,删除红色部分则会出现上面的异常:
convertView = LayoutInflater.from(getApplicationContext()).inflate(R.layout.baseadapter_provider, null);
TextView mTextView = (TextView) convertView.findViewById(R.id.textview);
Button button = (Button) convertView.findViewById(R.id.button1);
ImageView imageView = (ImageView) convertView.findViewById(R.id.imageView);

热点排行