0

I m doing my first steps with KSoap on Android (I m porting an iOS app to Android)

I get an exception while calling the WS

06-12 15:20:29.430: W/System.err(11912): java.net.UnknownHostException: www.mywebsite.com

I m pretty sure host is accessible and I get this error on a real android device with internet up.

Any ideas why?

Nico AD
  • 1,657
  • 4
  • 31
  • 51

2 Answers2

1

check in your manifest file for Internet permission

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

if its not available then add it like this

<manifest
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.samplesync"
    android:versionCode="yourversion code"
    android:versionName="your version name">
     <uses-permission android:name="android.permission.INTERNET" />
     .

     .
     .
 </manifest>
Akram
  • 7,548
  • 8
  • 45
  • 72
1

You haven't added the INTERNET permission:

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

OR

Your url doesnt have the host segment: should be like "http://www.mysite.com

DArkO
  • 15,880
  • 12
  • 60
  • 88