[SOLVED] Android Studio & Android Emulator: java.net.SocketException: socket failed: EPERM (Operation not permitted)

Reason 1

Make sure you add permissions in AndroidManifest.xml

    <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 Android Emulator and then run again the application from Android Studio.

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

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

Worked!