Android emulator connecting to is not working

Lots of android developer test their android app from the local server. Generally, they use a different type of android library, for example, Volley library to connect the app with localhost. Android emulator support to connect localhost.

Sometimes developers face some connecting issue with localhost whenever they make a request to server i.e HTTP traffic to not permitted

But if we try to send an HTTP request to others URL except, it is working fine, no problem there.

Generally, is for localhost, but in case of an android emulator, it uses as localhost.

So how to fix HTTP traffic to not permitted?

So we need to add one more line to our Android manifest file i.e


This usesCleartextTraffic attribute introduced by Android 6.0 (Marshmallow). By default, this attribute value is false. We need to set it to true from the manifest file. So here is the code look like.

<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
    <uses-permission android:name="android.permission.INTERNET" />

Spread the love
0 0 vote
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x