简体   繁体   English

亚马逊sdk android示例代码显示异常

[英]amazon sdk android sample code showing exception

I am trying to run sample code in aws-android-sdk-1.4.4. 我正在尝试在aws-android-sdk-1.4.4中运行示例代码。 I have edited the secret key and access key as specified in the document. 我已经编辑了文档中指定的秘密密钥和访问密钥。 But its showing the following error: 但其显示以下错误:

11-15 17:22:09.835: I/AmazonHttpClient(2141): Unable to execute HTTP request: Unable to resolve host "s3.amazonaws.com": No address associated with hostname 11-15 17:22:09.835:I / AmazonHttpClient(2141):无法执行HTTP请求:无法解析主机“ s3.amazonaws.com”:没有与主机名关联的地址

Could ny one pls help me to solve this issue. 有人可以帮助我解决这个问题吗?

Make sure you included following permissions in your manifest. 确保清单中包括以下权限。

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

I help maintain the AWS SDK for Android. 我帮助维护适用于Android的AWS开发工具包。 Our samples should work out of the box, so please make sure your device/simulator is able to connect to the internet by launching the web browser or using another application. 我们的示例应该是开箱即用的,因此请确保您的设备/模拟器能够通过启动Web浏览器或使用其他应用程序连接到Internet。 You may want to restart the emulator if it is unable to make outbound connections. 如果仿真器无法建立出站连接,则可能需要重新启动它。

Also, please make sure that you don't enter in any additional spaces when entering your access or secret key. 另外,请确保在输入访问权限或密钥时不要输入其他空格。

Update 2014-10-07: With the update to version 2 of the AWS SDK for Android, we've made the decision to require importing of the SDK jar files into all samples instead of including them in the repo. 2014年10月7日更新:针对适用于Android的AWS开发工具包的版本2进行了更新,我们决定要求将SDK jar文件导入所有示例中,而不是将其包含在存储库中。 All samples have README files that should indicate all the necessary steps to get started with that particular sample. 所有样本都具有README文件,该文件应指示从该特定样本开始的所有必要步骤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM