我正在尝试使用Android中的以下教程项目在azure中创建一个blob。
https://github.com/Azure/azure-storage-android
我创建了自己的免费试用帐户,并使用创建的帐户名和访问密钥替换了storageConnectionString。
public static final String storageConnectionString = "DefaultEndpointsProtocol=https;"
+ "AccountName=example.core.windows.net;"
+ "AccountKey=firstaccesskey";
但是我得到了以下例外:
java.net.UnknownHostException: Unable to resolve host "example.core.windows.net.blob.core.windows.net": No address associated with hostname
The server encountered an unknown failure:
Status code 500
我对storageConnectionString表示怀疑。我编写storageConnectionString的方式是rite?
答案 0 :(得分:1)
只需使用"帐户"在您的连接字符串中,这应该解决问题。 " blob.core.windows.net"将自动附加SDK。