public static Integer getResidentCount(){
//TODO
String url = BASE_URI+"/ass1.resident/findByResid";
Integer count = null;
try {
count= Integer.parseInt(HttpUtils.httpGet(url));
}catch (NumberFormatException e){
Log.w(TAG,"getResidentCount exception",e);
}
return count;
}
![错误](https://img-ask.csdn.net/upload/201804/30/1525061707_521365.png)
![debug](https://img-ask.csdn.net/upload/201804/30/1525061779_610642.png)
Cannot find local variable 'e'
关于安卓开发中count无法获取数据。。。。。。。。。。。
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
6条回答 默认 最新
- huanliandie 2018-04-30 04:56关注
把NumberFormatException改成Exception
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报