3

Android アプリで http 投稿リクエストに問題があります。

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

私のアプリは、1 つの Android フォンを除くほとんどの Android デバイスで正常に動作します。私のアプリは、その電話で http を介してインターネットに接続できません。ただし、ブラウザーなどの他のアプリは、その Android フォンで適切に実行できます。

について質問があり、アプリで許可EACCES (Permission denied)を確認しました<uses-permission android:name="android.permission.INTERNET" />が、問題はありません。

スタックトレースは次のとおりです。

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)
4

0 に答える 0