java - "Source not found" when debugging Android code in Eclipse -


i've been stuck on issue long time , can't seem find fix. have method want retrieve html source of website, every time run client.execute step, eclipse outputs "source not found". can hit breakpoint prior step , whether try "step over" line or hit "go" still receive "source not found". method

private void getquestions() {     try      {          uri url = null;         try          {             url = new uri("http://google.com");         }         catch (urisyntaxexception e)         {             e.printstacktrace();         }          httpclient client = new defaulthttpclient();         httpget request = new httpget();         request.seturi(url);          // line causes source not found         httpresponse response = client.execute(request);          system.out.println("httpresponse received");      }     catch (clientprotocolexception e)      {         // todo auto-generated catch block         e.printstacktrace();     } catch (ioexception e) {         // todo auto-generated catch block         e.printstacktrace();     }  } 

in androidmanifest.xml file i've added following prior tags

 <uses-sdk     android:minsdkversion="13"     android:targetsdkversion="17" /> <uses-permission android:name="android.permission.internet"/> 

i've found people similar problems , tried fixes no success. i've added application name source path , placed above default.

source

i've moved application bottom of build paths

build path

i running eclipse ide java developers

version: juno service release 1

i have created 1 demo, , working fine in mine.. please check it, think might you..

uri url = null;         try          {             url = new uri("http://www.google.com");              httpclient client = new defaulthttpclient();             httpget request = new httpget(url);              httpresponse response = client.execute(request);              bufferedreader rd = new bufferedreader(new inputstreamreader(response.getentity().getcontent()));             string line = "";             stringbuilder total = new stringbuilder();             try              {                 while ((line = rd.readline()) != null)                  {                      total.append(line);                 }             }              catch (ioexception e)              {                 e.printstacktrace();             }             log.w("html",total.tostring());         }         catch (exception e)         {             e.printstacktrace();         } 

and using in manifest file.

<uses-sdk android:minsdkversion="7" /> <uses-permission android:name="android.permission.internet" /> 

and think should put "jsoup-1.7.2.jar" file in libs directory , add jar in project libs directory. , select checkbox "check (true)" of jar in java build path dialog. ( it's not necessary should checked). like..

enter image description here


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -