hi all!

I am getting the same exception (OSNetworkSystem unknown socket error
-1).

using the SDK 1.0
not behind a proxy
i can load the page througth the browser
i have the <uses-permission
android:name="android.permission.INTERNET" /> tag in
AndroidManifest.xml

And i still getting the exception

Any ideias?


On 21 ago, 22:38, dai <[EMAIL PROTECTED]> wrote:
> Yup, it's working well ;) Thank you so much for caring.
>
> On 8月22日, 午前8:07, "Justin (Google Employee)" <[EMAIL PROTECTED]> wrote:
>
> > Ah, and Mark already got this one. Such a mess in here with the
> > changed subject lines! :-)
>
> > Cheers,
> > Justin
> > Android Team @ Google
>
> > On Aug 21, 4:07 pm, "Justin (Google Employee)" <[EMAIL PROTECTED]>
> > wrote:
>
> > > You'll need to add
> > >     <uses-permission android:name="android.permission.INTERNET" />
> > > to your manifest file if your application wishes to use data.
>
> > > Cheers,
> > > Justin
> > > Android Team @ Google
> > > On Aug 20, 12:43 am, DeMorgan <[EMAIL PROTECTED]> wrote:
>
> > > > Justine:
> > > > "I'm able to use HttpClient just fine (in fact, just posted some
> > > > sample
> > > > code for doing multipart posts). "
>
> > > > Hi Justine,
> > > > I have tried to migrate to new http client, in previous release I was
> > > > using classes:
> > > > import org.apache.commons.httpclient.HttpClient;
> > > > import org.apache.commons.httpclient.HttpStatus;
> > > > import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
> > > > import org.apache.commons.httpclient.methods.PostMethod;
>
> > > > Now I have moved to new http client, but I am getting en exception:
> > > > java.net.SocketException:unknownerror
> > > > at
> > > > org.apache.harmony.luni.platform.OSNetworkSystem.createSocketImpl(Native
> > > > Method)
> > > > at
> > > > org.apache.harmony.luni.platform.OSNetworkSystem.createSocket(OSNetworkSystem.java:
> > > > 79)
> > > > at
> > > > org.apache.harmony.luni.net.PlainSocketImpl2.create(PlainSocketImpl2.java:
> > > > 59)
> > > > at java.net.Socket.checkClosedAndCreate(Socket.java:763)
> > > > at java.net.Socket.connect(Socket.java:910)
> > > > at
> > > > org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:
> > > > 117)
> > > > at
> > > > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:
> > > > 129)
> > > > at
> > > > org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:
> > > > 164)
> > > > at
> > > > org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:
> > > > 119)
> > > > at
> > > > org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:
> > > > 348)
> > > > at
> > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
> > > > 555)
> > > > at
> > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
> > > > 487)
> > > > at
> > > > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:
> > > > 465)
>
> > > > If you have working examples with new client, please let me know where
> > > > I can find them.
>
> > > > Regards,
> > > > Nick
>
> > > > On Aug 20, 3:40 am, dai <[EMAIL PROTECTED]> wrote:
>
> > > > > aahh, I'm so sorry.. What I said I could run was with RC5.
>
> > > > > Thank you, I'll post code later.
>
> > > > > > I'm confused -- you say for HTTPS, you get the exception, then 
> > > > > > later,
> > > > > > you say you use HTTPS and it works. Which is it? Or does the 
> > > > > > exception
> > > > > > come and go?
>
> > > > > On Aug 20, 9:35 am, Mark Murphy <[EMAIL PROTECTED]> wrote:
>
> > > > > > dai wrote:
> > > > > > > Yes, I can access web sites via build in web browser. I mainly use
> > > > > > > https:443.. then run into unknownhost exception.
> > > > > > > I aslo tried to access via http:80, sameerrorhappened.
>
> > > > > > > Speaking of https:443, I could reach the target host without 
> > > > > > > problems.
>
> > > > > > I'm confused -- you say for HTTPS, you get the exception, then 
> > > > > > later,
> > > > > > you say you use HTTPS and it works. Which is it? Or does the 
> > > > > > exception
> > > > > > come and go?
>
> > > > > > > Are you be able to access web sites now from you own app with 
> > > > > > > beta0.9
> > > > > > > - httpclient..?
>
> > > > > > I won't be updating that chapter in my book until this weekend, in 
> > > > > > all
> > > > > > likelihood. Too many code samples, too little time...
>
> > > > > > But, as Justin pointed out, others can use the new HttpClient just 
> > > > > > fine.
> > > > > > Can you post some code that demonstrates the problem?
>
> > > > > > --
> > > > > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > > > > Warescription: All titles, revisions, & ebook formats, just $35/year
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to