【发布时间】:2015-06-30 11:57:10
【问题描述】:
对于我的 android 应用,我正在为后端编写端点代码。
在我的 appengine 数据存储方法中,当我尝试使用密钥访问我的实体时,我得到
java.lang.IllegalArgumentException: Invalid Key PB: no elements
以下是我尝试过的代码sn-ps
Key key = KeyFactory.stringToKey(keyId);
key = KeyFactory.stringToKey(URLEncoder.encode(keyId, "utf-8"));
keyId 是字符串类型。
如何解决?
【问题讨论】:
标签: java android google-app-engine android-studio google-cloud-datastore