Actually, i have the same problem.
I think the problem come to the :80. In fact, when I tried, in a
browser, the URL with the port (:80) it doesn't work. Without, It
works.
But, the port number is put automatically, so, i don't know what to
do.
Somebody has an idea??
(sorry about my English, I'm French)
On 8 oct, 13:01, Charlie Collins <[EMAIL PROTECTED]> wrote:
> That error seems more involved than potentially just what your
> application is doing. Can you browse to that URL (or others) from the
> browser on the emulator? Leave your app out of the equation and make
> sure the platform is working as you expect first. Might need to make
> sure you have a clean Android install and -wipe-data when you start.
> Not sure, but "NetworkStateTracker(52): Can't set tcp buffer
> sizes:java.io.FileNotFoundException: /sys/kernel/ipv4/tcp_rmem_min"
> sounds like Android itself is not happy (as opposed to just an app
> error).
>
> Also, that looks like some of my code from the Manning book Unlocking
> Android. If it is, that hasn't been updated yet to work in the 1.0
> SDK so you may get various errors unless you are running it on m5, or
> you have updated it. I am in the process right now of updating the
> code and the text for the book - to get everything up to 1.0. I am
> actually re-working that particular sample code project this week, if
> you want to send me an email I can zip it and send it to you when I am
> done (it will eventually get update on the Manning MEAP site too, but
> will take longer).
>
> On Oct 7, 10:23 am, nichojo <[EMAIL PROTECTED]> wrote:
>
> > I have this:
>
> > public void onCreate(Bundle savedInstanceState) {
> > super.onCreate(savedInstanceState);
>
> > /* Create a new TextView to display the parsing result later.
> > */
> > TextView tv = new TextView(this);
> > try
> > {
> > /* Create a URL we want to load some xml-data from. */
> > String queryString = "http://weather.yahooapis.com/
> > forecastrss?p=36832";
> > /* Replace blanks with HTML-Equivalent. */
> > URL url = new URL(queryString.replace(" ", "%20"));
>
> > /* Get a SAXParser from the SAXPArserFactory. */
> > SAXParserFactory spf = SAXParserFactory.newInstance();
> > SAXParser sp = spf.newSAXParser();
>
> > /* Get the XMLReader of the SAXParser we created. */
> > XMLReader xr = sp.getXMLReader();
> > /* Create a new ContentHandler and apply it to the XML-
> > Reader */
> > WeatherHandler myWeatherHandler = new WeatherHandler();
> > xr.setContentHandler(myWeatherHandler);
>
> > /* Parse the xml-data from our URL. */
> > xr.parse(new InputSource(url.openStream()));
> > /* Parsing has finished. */
> > tv.setText(myWeatherHandler.getInfo());
>
> > } catch (Exception e)
> > {
> > tv.setText("Error: " + e.getMessage());
> > Log.e(MY_DEBUG_TAG, "WeatherQueryError", e);
> > }
> > /* Display the TextView. */
> > setContentView(tv);
> > }
>
> > For some reason I get a bunch network errors:
>
> > 10-07 14:22:21.702: ERROR/NetworkStateTracker(52): Can't set tcp
> > buffer sizes:java.io.FileNotFoundException: /sys/kernel/ipv4/
> > tcp_rmem_min
> > 10-07 14:22:22.462: ERROR/AUWeather(156): WeatherQueryError
> > 10-07 14:22:22.462: ERROR/AUWeather(156):
> > java.net.UnknownHostException:Hostisunresolved:
> > weather.yahooapis.com:80
> > 10-07 14:22:22.462: ERROR/AUWeather(156): at
> > java.net.Socket.connect(Socket.java:928)
>
> > I have added the internet permission and this code is almost line by
> > line just like the example. I am not behind a proxy either. Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---