Android应用程序http post请求获得libcore.io.ErrnoException:套接字失败:EACCES(权限被拒绝)

时间:2012-08-06 04:25:20

标签: android http permissions

我的Android应用程序中的http post请求有问题:

libcore.io.ErrnoException: socket failed: EACCES (Permission denied)

我的应用程序适用于大多数Android设备,除了一个Android手机,我的应用程序无法通过该手机上的http连接到互联网。 但其他应用程序可以在Android手机上运行良好,例如浏览器。

我发现有一些关于EACCES (Permission denied)的问题,我在我的应用中检查了<uses-permission android:name="android.permission.INTERNET" />权限,没有任何问题。

这是stacktrace:

java.net.SocketException: socket failed: EACCES (Permission denied)
at libcore.io.IoBridge.socket(IoBridge.java:573)
at java.net.PlainSocketImpl.create(PlainSocketImpl.java:201)
at java.net.Socket.checkOpenAndCreate(Socket.java:693)
at java.net.Socket.connect(Socket.java:837)
at libcore.net.http.HttpConnection.<init>(HttpConnection.java:77)
at libcore.net.http.HttpConnection.<init>(HttpConnection.java:50)
at libcore.net.http.HttpConnection$Address.connect(HttpConnection.java:351)
at libcore.net.http.HttpConnectionPool.get(HttpConnectionPool.java:86)
at libcore.net.http.HttpConnection.connect(HttpConnection.java:128)
at libcore.net.http.HttpEngine.openSocketConnection(HttpEngine.java:308)
at libcore.net.http.HttpEngine.connect(HttpEngine.java:303)
at libcore.net.http.HttpEngine.sendSocketRequest(HttpEngine.java:282)
at libcore.net.http.HttpEngine.sendRequest(HttpEngine.java:232)
at libcore.net.http.HttpURLConnectionImpl.connect(HttpURLConnectionImpl.java:80)
at libcore.net.http.HttpURLConnectionImpl.getOutputStream(HttpURLConnectionImpl.java:188)
at cn.com.fetion.android.common.ability.HttpProxy.openDataOutputStream(HttpProxy.java:252)
at cn.com.fetion.javacore.v11.network.HttpConnectionThread.doSendMessage(HttpConnectionThread.java:188)
at cn.com.fetion.javacore.v11.network.HttpConnectionThread.doSendMessage(HttpConnectionThread.java:262)
at cn.com.fetion.javacore.v11.network.HttpConnectionThread.doSendMessage(HttpConnectionThread.java:262)
at cn.com.fetion.javacore.v11.network.HttpConnectionThread.doSendMessage(HttpConnectionThread.java:262)
at cn.com.fetion.javacore.v11.network.ConnectionThread.executeConnectionRequest(ConnectionThread.java:185)
at cn.com.fetion.javacore.v11.network.ConnectionThread.run(ConnectionThread.java:137)
at cn.com.fetion.javacore.v11.network.HttpConnectionThread.run(HttpConnectionThread.java:1)
Caused by: libcore.io.ErrnoException: socket failed: EACCES (Permission denied)
at libcore.io.Posix.socket(Native Method)
at libcore.io.BlockGuardOs.socket(BlockGuardOs.java:181)
at libcore.io.IoBridge.socket(IoBridge.java:558)

0 个答案:

没有答案