mercredi 6 juillet 2016

Unable to resolve host, no address associated with hostname

I just got started with Android Studio and made a small application. My problem is that i cannot connect to a website. I've added volley to my project to handle the responses. I searched other similar questions but all the responses suggested to add a permission to the manifest file(which i already have it).

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

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <activity android:name=".MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

When the request is being made i get back an error: java.net.UnknownHostException: Unable to resolve host "url goes here": No address associated with hostname
The url works, i tried accessing it from my browser.
What can i do?

Aucun commentaire:

Enregistrer un commentaire