title: In ListItem cannot be applied to java.lang.String android
body: <p>In this case, I have a problem when I'm trying to add a string to my ListItem, I follow this <a href="https://www.youtube.com/watch?v=HYLbHkBi6So&amp;t=633s" rel="nofollow noreferrer">tutorial</a> in order to make this. I did exactly what the video told me, but it's still getting me the error 'In ListItem cannot be applied to java.lang.String' and I don't understand why. Here's my code:</p>
  
  <pre><code>public class ListScientistsFragment extends Fragment {
  
  
  private final String TAG = "ListScientistsFragment";
  private static final String URL_DATA = "http://jsonplaceholder.typicode.com/photos";
  
  private String[] scientistNames = {"Marie Curie","Thomas Edison","Albert Einstein","Michael Faraday","Galileo Galilei",
          "Stephen Hawking","Johannes Kepler","Issac Newton","Nikola Tesla"};
  private String[] birthYear = {"1867","1847","1879","1791","1564","1942","1571","1643","1856"};
  private String[] deathYear = {"1934","1931","1955","1867","1642","Present","1630","1727","1943"};
  private int[] image = {R.drawable.curie,R.drawable.edison,R.drawable.einstein,R.drawable.faraday,R.drawable.galileo,R.drawable.hawking,R.drawable.kepler,R.drawable.newton,R.drawable.tesla};
  
  private ArrayList&lt;Scientist&gt; mScientists;
  private RecyclerView mScientistRecyclerView;
  private List&lt;LauncherActivity.ListItem&gt; listItems;
  private ScientistAdapter mAdapter;
  public ImageView mImageView;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      mScientists = new ArrayList&lt;&gt;();
      listItems = new ArrayList&lt;&gt;();
      for(int i =0;i&lt;scientistNames.length;i++){
          Scientist s = new Scientist();
          s.setName(scientistNames[i]);
          s.setBirthYear(birthYear[i]);
          s.setDeathYear(deathYear[i]);
          mScientists.add(s);
      }
      loadImagesToView();
      super.onCreate(savedInstanceState);
  }
  
  private void loadImagesToView() {
      final ArrayList&lt;String&gt; list = new ArrayList&lt;String&gt;();
      StringRequest stringRequest = new StringRequest(Request.Method.GET,
              URL_DATA,
              new Response.Listener&lt;String&gt;() {
                  @Override
                  public void onResponse(String response) {
                      try {
                          JSONArray jsonarray = new JSONArray(response);
                          for(int i=0;i&lt;jsonarray.length();i++) {
                              JSONObject o = jsonarray.getJSONObject(i);
  //HERE'S MY PROBLEM ------------------------------------
                                  LauncherActivity.ListItem item;
                                  item = new LauncherActivity.ListItem(
                                          o.getString("url")
                                  );
  //--------------------------------------------
                              listItems.add(item);
                          }
  
                      } catch (Exception e) {
                          e.printStackTrace();
                      }
  
                  }
              },
              new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
  
                  }
              }
      );
  </code></pre>
  
  <p>I just want to add each "URL" that I'm getting from the specific URL_DATA, which is a JSON with other fields, but I need url specifically. I'm going to load this into a RecyclerView. Hope you understand.</p>