这是我的代码的一部分,在我的代码中,我得到了电影的“标题”和“概要”,但“个人资料”部分由于某种原因不起作用,我无法从网站,这里是网站api,谢谢你的帮助。
@Override
protected void onPostExecute(String response) {
super.onPostExecute(response);
try {
// convert the String response to a JSON object
JSONObject jsonResponse = new JSONObject(response);
// fetch the array of movies in the response
JSONArray jArray = jsonResponse.getJSONArray("movies");
// add each movie's title to a list
movieTitles = new ArrayList<String>();
movieSynopsis = new ArrayList<String>();
movieImgUrl= new ArrayList<String>(); // **problematic**
for (int i = 0; i < jArray.length(); i++) {
JSONObject movie = jArray.getJSONObject(i);
movieTitles.add(movie.getString("title"));
movieSynopsis.add(movie.getString("synopsis"));
movieImgUrl.add(movie.getString("profile")); // **problematic**
}