Parse.com ListView 教程存在问题

An issue with Parse.com ListView tutorial

我在使用 this 教程时遇到问题。 我每一行只有一个 TextView。 当我尝试填充 ListView 时,它看起来像这样:
一种
一种
A

而不是:
一种

C

我的意思是,它显示所有 TextView 的第一行 TextView 文本,而不是不同的 TextView。

这是 AsyncTask 的 doInBackground 方法,如教程中所示:

@Override
    protected Void doInBackground(Void... params) {
        // Create the array
        worldpopulationlist = new ArrayList<WorldPopulation>();
        try {
            // Locate the class table named "Country" in Parse.com
            ParseQuery<ParseObject> query = new ParseQuery<ParseObject>("Restaurants");
            query.whereWithinKilometers("Location", SearchActivity.loc, 2.0);
            query.setLimit(5);
            ob = query.find();
            for (ParseObject country : ob) {
                WorldPopulation map = new WorldPopulation();
                map.setName((String) country.get("Name"));
                worldpopulationlist.add(map);
            }
        } catch (ParseException e) {
            Log.e("Error", e.getMessage());
            e.printStackTrace();
        }
        return null;
    }

我该怎么做才能解决这个问题?

我发现了问题。我在 WorldPopulation class 上不小心将 private 更改为 public static。答案是将所有变量改回 private,所以不要这样:

public static String Name;

会是这样的:

private String Name;