获取的异常而在android系统连接到互联网 [英] Getting Exception while Connecting to Internet in android

查看:89
本文介绍了获取的异常而在android系统连接到互联网的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用OpenHttpConnection(URL)方法来在我的Andr​​oid应用程序连接互联网。但是,让java.io.IOException异常:错误Conneting。如何我能避免这种情况。在Android清单权限给了。
请帮帮我 。
谢谢。

I am use OpenHttpConnection(URL) method to connect internet in my android application. But getting "java.io.IOException:Error Conneting".How i can avoid this. Permissions in android manifest had given. Please help me . Thank you.

推荐答案

第1步:请你一定INTERNET权限是在正确的位置。

Step #1: Make certain your INTERNET permission is in the correct place.

第2步:确保你的设备或仿真器访问Internet。例如,如果您使用的是模拟器,你看到你有在状态栏图标信号强度为零吧,你的模拟器没有上网。如果仿真器是无法检测到互联网,当你启动模拟器会发生。

Step #2: Make certain your device or emulator has Internet access. For example, if you are using the emulator, and you see that you have zero bars of signal strength in the status bar icon, your emulator does not have Internet access. That will happen if the emulator was unable to detect Internet access when you started up the emulator.

第三步:确保无论你试图连接到实际上是建立和运行

Step #3: Make certain that whatever you are trying to connect to is actually up and running.

这篇关于获取的异常而在android系统连接到互联网的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆