android 报错集合

1  Activity class {com.work.searchclassroom/com.work.searchclassroom.FirstActivity} does not exist.

如果第一次能用,但之后出现这个,那么只需在project-clean一下就好了

2 E/HttpClient(18072): failed to connect to /10.1.2.137 (port 8080): connect failed: EHOSTUNREACH (No route to host) IO error

 

由于不存在到网络或主机的路由,因此可能会发生这些操作错误。这些错误还可能是由于中间网关或切换节点所返回的状态信息造成的。返回的状态信息并不总是足以区分网络故障和主机故障。

背景: 电脑连接图书馆wifi,手机连接图书馆wifi,手机USB接入电脑

客户端通过线程,发送请求

new SearchTask().execute("http://10.1.2.137:8080/searchClass/json/searchClass.action?week="

+mWeek+"+&time="+mTime);

myeclipse server上运行服务器

遇到的问题是:有时候能正常使用,有时候网络就不通,就这个错误。

我的解决办法是:

1  手机接电脑的usb拔掉、电脑wifi关闭,手机wifi关闭

2手机usb插入电脑,电脑wifi打开并连接上,手机连接上wifi

就这两步。

3 failed to connect to /192.168.191.1 (port 8080): connect failed: ENETUNREACH (Network is unreachable) IO error

这通常是IP配置错误的缘故。

尝试ping一些这个ip

4 failed to connect to /192.168.191.2 (port 8080): connect failed: ECONNREFUSED (Connection refused) IO error

ECONNREFUSED意思就是:

主机拒绝服务。当请求地址中没有显示服务器进程时,会发生此错误。

PS:手机端向服务端发送请求,请求地址写手机端IP是搞毛?服务器又不在手机上,而是在电脑上,应该写电脑IP才对,所以写手机IP肯定会出错吧。

/json

文/顺顺顺(简书作者)
原文链接:http://www.jianshu.com/p/167d5d82639a
著作权归作者所有,转载请联系作者获得授权,并标注“简书作者”。

时间: 2024-08-05 05:06:35

android 报错集合的相关文章

cocos2dx在windows下搭建环境android报错

报错:Program bash is not found in PATH (如果按照我的方法来的话是没有这个错误的,我之前用别的方法的时候有但是后来还是没解决,写出来放到这里做参考吧) 参考原文:http://blog.csdn.net/fuyongbing1986/article/details/11556149 方法: 1.把cygwin/bin加入系统环境变量Path下 2.右击工程-->properties-->C/C++ Build -->ToolChain Edit    确

cordova platform add android报错问题处理

第一次在博客园写博客,有错误的还请大神不要喷,互相学习么,我也是正在学习中,这是我遇到的问题及解决的办法. cordova platform add android 报错内容大致是匹配不到cordova-android版本,在百度上查的资料说是android sdk环境没配置成功,于是我执行android -h 发现报错:"找不到路径". 于是在晚上又百度,说是在环境变量path里面添加%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\Sy

Android报错

1. Starting emulator for AVD 'new' emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed! 发生情景: 创建 Android 模拟器,模

Android报错:WindowManager$BadTokenException: Unable to add window -- window has already been added

很久之前测试通过的代码,现在手机升级了Android7.0后一运行就崩溃,报出这样的错误,具体错误如下: Process: com.example.sho.android_anti_theft, PID: 26807 android.view.WindowManager$BadTokenException: Unable to add window -- window [email protected] has already been added at android.view.ViewRoo

cocos run -p android 报错:文件名、目录名卷标语法不正确

我的项目是cocos2d-x-3.7.1的项目,用命令行(cocos run -p android)打包的时候报错: running: '"D:\develop\adt-bundle-windows-x86-20140321\apache-ant-1.9.3\bin\ant"clean debug -f D:\deveop\Test\proj.android\build.xml -Dsdk.dir="D:\develop\adt-bundle-windows-x86-2014

Android报错:The content of the adapter has changed...与Channel is unrecoverably broken and will be disposed的分析与解决办法

在Android中adapter错误: The content of the adapter has changed but ListView did not receive a notification. Make sure the content of your adapter is not modified from a background thread, but only from the UI thread. 分析: 这个错误通常是listview等控件在使用adapter适配数据时

ionic真机调试Android报错 - could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon

在使用真机调试Android程序时,报错如下: could not read ok from ADB Server * failed to start daemon error: cannot connect to daemon 首先,打开命令行工具,找出占用5037端口号的对应pid号 netstat -ano | findstr :5037 如果端口被占用,在任务列表中找到占用端口的进程 tasklist | findstr processID 打开任务管理器,将对应pid号的进程杀死.然后

ionic cordova build android 报错 解决

执行 ionic cordova build android 时遇到报错,build时需要安装一些依赖的,所以首先必须联网,另外,这遇到这个错误时npm registry用的是taobao的镜像:https://registry.npm.taobao.org/, 然后我改为了cnpm镜像 :http://r.cnpmjs.org/,再次执行ionic cordova build android成功了.推荐安装nrm,用nrm来进行npm registry的管理,简单方便. 原文地址:https:

ionic2踩坑之ionic build android报错

自己项目一直跑的好好好好的,build还是run都没问题,今天忽然一个小伙伴build一直报错.\ 错误如下: Error occurred during initialization of VMCould not reserve enough space for 2097152KB object heap 第一反应是java虚拟机内存不够,然后按网上的新建环境变量 变量名:_JAVA_OPTIONS 变量值:-Xmx512M 然并卵,问题并没有得到解决,最后在一个国外网站上找到了问题原因. 原