2

我开发了一个 android 应用程序,其中图像和音频是从 Amazon S3 存储桶下载的。在所有设备(sony xperia sola、HTC Salasa、Micromax funbook、samsung tab 2)和安卓模拟器中,它都能完美下载。

但是当我尝试在kindle fire中下载图像和音频时。它给了我错误

04-01 03:58:01.148: W/System.err(15854): com.amazonaws.AmazonClientException: Unable to execute HTTP request: No peer certificate
04-01 03:58:01.148: W/System.err(15854):    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:332)
04-01 03:58:01.148: W/System.err(15854):    at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:167)
04-01 03:58:01.148: W/System.err(15854):    at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:2781)
04-01 03:58:01.148: W/System.err(15854):    at com.amazonaws.services.s3.AmazonS3Client.getObject(AmazonS3Client.java:872)
04-01 03:58:01.148: W/System.err(15854):    at org.Infoware.famouspeople.DownloadThread.run(DownloadThread.java:122)
04-01 03:58:01.148: W/System.err(15854): Caused by: javax.net.ssl.SSLPeerUnverifiedException: No peer certificate
04-01 03:58:01.148: W/System.err(15854):    at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:258)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:93)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:381)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:164)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:359)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
04-01 03:58:01.148: W/System.err(15854):    at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
04-01 03:58:01.148: W/System.err(15854):    at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:285)
04-01 03:58:01.148: W/System.err(15854):    ... 4 more

任何人都可以帮我解决这个问题吗?

4

2 回答 2

1

我也有这个问题。原来这是由 wifi 路由器上的透明 HTTP(S) 代理重定向到 wifi 登录页面引起的。可能值得检查一下。例如,如果您对 wifi 网络的授权超时,错误可能会出现间歇性。

于 2013-09-20T12:38:33.273 回答
0

对我来说,我只是将 android 版本更改为 4.1 并解决问题。请在您的代码中尝试可能会对您有所帮助。

于 2013-06-25T12:31:01.487 回答