Android : Error in http connection java.net.SocketException: Permission denied


Posted on : Mon, 18th May 15 08:43 am UTC
100+ votes

05-18 14:06:38.429: I/System.out(13921): Error in http connection java.net.SocketException: Permission denied
05-18 14:06:43.709: I/System.out(13921): Error in http connection java.net.SocketException: Permission denied
05-18 14:06:47.629: I/System.out(13921): Error in http connection java.net.SocketException: Permission denied

This is the most common error faced by Android Developers, reason ? Well you just missed to add Internet permissions,

Solution :

Simple add the below line in your AndroidManifest.xml file. If your app is using any hardware like bluetooth, camera, gps e.t.c then you gotta get the user permission.

File : AndroidManifest.xml Language : XML
<uses-permission android:name="android.permission.INTERNET"/>


Advertisements





Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

Follow us : Facebook - Twitter - Google +