이것은 머리를 쓰고 있습니다. 약 10 분 후에 iOS에서 작동합니다. 분명히 나는 뭔가를 놓치고있다. 필자는 단순히 parse.com에서 데이터를 텍스트 필드로 가져 오려고합니다. 많은 예제를 찾았지만 왜 제대로 작동하지 않는지 설명하지 못했습니다. 아래는 parse.com 사이트에서 가져온 코드입니다. 덧붙여서, 그것은 totemList.getString 특히 "getString"부분에서 빠져 나옵니다.parse.com에서 데이터를 검색하고 텍스트 필드를 채우십시오.
ParseQuery<ParseObject> query = ParseQuery.getQuery("Birds");
query.whereEqualTo("totemName", "Pigeon");
query.findInBackground(new FindCallback<ParseObject>() {
public void done(List<ParseObject> totemList, ParseException e) {
if (e == null) {
Log.d("score", "Retrieved " + totemList.size() + " scores");
String totemDesc = totemList.getString("totemDesc");
//Get the Totems Description
TotemDescription = (TextView)findViewById(R.id.animalDesc);
TotemDescription.setText(totemDesc);
} else {
Log.d("score", "Error: " + e.getMessage());
// something went wrong
TotemDescription = (TextView)findViewById(R.id.animalDesc);
TotemDescription.setText("not bob");
}
}
});
을 ? –
'getString (java.lang.String); 메서드를 확인할 수 없습니다. – Jeremy
BTW hector는 parse.com 사이트에서 직접 가져온 것이므로 동물을 코딩 할 때 해를 끼치 지 않았습니다. – Jeremy