1.java.lang.RuntimeException: Unable to instantiate activity ComponentInfo
之前adt升级到最新版,使用第三方jar出现上述异常,解决方案:在工程中建libs文件夹,把jar包放入,设置:Window->Project->Properties->Java Build Path->Order and Export中选中第三方类库,并勾选。运行正常。
2.
out of memory......
//防止内存泄露,及时remove
public void removeCall(){
if (mHandler!=null) {
mHandler.removeCallbacks(r);
}
}
//应避免多次new同一消息
Message msg = mHandler.obtainMessage();
msg.what = UPDATE_LISTVIEW;
或//Message ms =mHandler.obtainMessage(UPDATE_LISTVIEW); // 构造要传递的消息
mHandler.sendMessage(msg);
关于使用MAT分析内存泄露
比较好的博文 参考 http://blog.youkuaiyun.com/lznsnail/article/details/7652331 &http://blog.youkuaiyun.com/lznsnail/article/details/7652333