[SOLVED] : java.net.SocketException: socket failed EPERM Operation not permitted – 2 bad and simple reasons

You are currently viewing [SOLVED] : java.net.SocketException: socket failed EPERM Operation not permitted – 2 bad and simple  reasons
Photo by The Average Tech Guy on Unsplash
Share This Post, Help Others, And Earn My Heartfelt Appreciation! :)
4.9
(1379)

Reason 1 -> java.net.socketexception: socket failed: eperm operation not permitted

[ socket failed EPERM Operation not permitted ] The first place to look for the cause may be to check the file AndroidManifest.xml. Make sure you add permission:

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

Reason 2

If you still get this error despite adding the above permissions, then uninstall the application from Emulator and then run again the application from Android Studio.

If you enjoyed this post please add the comment below and share this post on your Facebook, Twitter, LinkedIn or another social media webpage.
Thanks in advanced!

How useful was this post?

Click on a star to rate it!

Average rating 4.9 / 5. Vote count: 1379

No votes so far! Be the first to rate this post.

Subscribe
Notify of
guest
2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Ilimbek

Worked!