当我将我的应用从Eclipse迁移到Android Studio时,我在以下代码中出现错误:
AddList.Add(Add);
Addlist是一个ListView小部件。 for(int i=0;i<jArray.length();i++){
Advertisement Add=new Advertisement();
JSONObject jRealObject=jArray.getJSONObject(i);
//Set the Value
Add.setTitle(jRealObject.getString("Title"));
Add.setLikes(jRealObject.getString("Likes"));
//Add Data to List
AddList.Add(Add);
}