【发布时间】:2015-01-03 13:58:08
【问题描述】:
我正在尝试使用 parse 检索对象,但出现错误
gameScore 无法解析。
我正在关注https://parse.com/docs/android_guide#objects-classes上的确切解释
我做错了什么?
public class ParseStarterProjectActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ParseAnalytics.trackAppOpenedInBackground(getIntent());
ParseQuery<ParseObject> query = ParseQuery.getQuery("GameScore");
query.getInBackground("gDlXAym3S7", new GetCallback<ParseObject>() {
public void done(ParseObject object, ParseException e) {
if (e == null) {
System.out.println("object found");
int score = gameScore.getInt("score");
String playerName = gameScore.getString("playerName");
boolean cheatMode = gameScore.getBoolean("cheatMode");
} else {
System.out.println("object not found");
}
}
});
}
}
【问题讨论】:
标签: object parse-platform