android - jsoup java.net.UnknownHostException while trying Jsoup.connect(''any url'') -


im trying run piece of code

            string test;             document doc= null;             try {                 doc = jsoup.connect("http:\\thatsthefinger.com\\").get();                 test=doc.title();             } catch (ioexception e) {                 e.printstacktrace();                 out.settext(e.getmessage());             } 

this execption im getting.

w/system.err: java.net.unknownhostexception: http:\thatsthefinger.com\ w/system.err:     @ com.android.okhttp.internal.http.httpengine.createaddress(httpengine.java:1143) w/system.err:     @ com.android.okhttp.internal.http.httpengine.connect(httpengine.java:323) w/system.err:     @ com.android.okhttp.internal.http.httpengine.sendrequest(httpengine.java:249) w/system.err:     @ com.android.okhttp.internal.huc.httpurlconnectionimpl.execute(httpurlconnectionimpl.java:437) w/system.err:     @ com.android.okhttp.internal.huc.httpurlconnectionimpl.connect(httpurlconnectionimpl.java:114) w/system.err:     @ org.jsoup.helper.httpconnection$response.execute(httpconnection.java:652) w/system.err:     @ org.jsoup.helper.httpconnection$response.execute(httpconnection.java:629) w/system.err:     @ org.jsoup.helper.httpconnection.execute(httpconnection.java:261) w/system.err:     @ org.jsoup.helper.httpconnection.get(httpconnection.java:250) w/system.err:     @ gplabs.szalpha.mainactivity$1.onclick(mainactivity.java:62) w/system.err:     @ android.view.view.performclick(view.java:5207) w/system.err:     @ android.view.view$performclick.run(view.java:21177) w/system.err:     @ android.os.handler.handlecallback(handler.java:739) w/system.err:     @ android.os.handler.dispatchmessage(handler.java:95) w/system.err:     @ android.os.looper.loop(looper.java:148) w/system.err:     @     android.app.activitythread.main(activitythread.java:5441) w/system.err:     @ java.lang.reflect.method.invoke(native method) w/system.err:     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:738) w/system.err:     @ com.android.internal.os.zygoteinit.main(zygoteinit.java:628) 

i searched everywhere , did could, couldn't solve. @ least give me working piece of code on version of android studio, because doubt avm. in advance.

write this

connect("http://www.thatsthefinger.com")


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -