title: Type mismatch: cannot convert from String to List<Cmd>
body: <p>I'm getting the follwoing error:</p>
  <blockquote>
  <p>Type mismatch: cannot convert from String to List</p>
  </blockquote>
  <p>on the line <code>this.videos = videos;</code> from the following code:</p>
  <pre class="lang-java prettyprint-override"><code>public void setVideos(String videos) {
      this.videos = videos;
  }
  </code></pre>
  <p>I've tried following both of Eclipse's suggestions:</p>
  <ul>
  <li>Change type of videos to string</li>
  <li>Change type of videos to List</li>
  </ul>
  <p>However, neither seems to resolve the issue and both cause additonal errors.</p>
  <p>I'm not sure exactly what I can do to resolve the issue at this point.</p>
  <h2>Cmd.java</h2>
  <pre class="lang-java prettyprint-override"><code>public class Cmd implements ListAdapter {
  
      private String success;
      private String cmd;
      List&lt;Cmd&gt; videos;
      private String video;
      private String numberofvideos;
      private String videoname;
      private String videourl;
      private LayoutInflater mInflater;
      Button fav_up_btn1;
      Button fav_dwn_btn1;
      Context my_context;   
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
  
          if (convertView == null) {
              convertView = mInflater.inflate(R.layout.list_item_user_video,
                      parent, false);
          }
  
          ImageView thumb = (ImageView) convertView
                  .findViewById(R.id.userVideoThumbImageView);
          TextView title = (TextView) convertView
                  .findViewById(R.id.userVideoTitleTextView);
          TextView uploader = (TextView) convertView
                  .findViewById(R.id.userVideouploaderTextView);        
          TextView viewCount = (TextView) convertView
                  .findViewById(R.id.userVideoviewsTextView);
          uploader.setText(videos.get(position).getTitle());
          viewCount.setText(videos.get(position).getviewCount() + &quot; views&quot;);
  
          // Get a single video from our list
          final Cmd video = videos.get(position);
  
          // Set the image for the list item
  
          
          // Set the title for the list item
          title.setText(video.getTitle());
          uploader.setText(&quot;by &quot; + video.getUploader() + &quot; |  &quot;);
  
          return convertView;
      }
  
      public String getUploader() {
          // TODO Auto-generated method stub
          return null;
      }
  
      public String getviewCount() {
          // TODO Auto-generated method stub
          return null;
      }
  
      public CharSequence getTitle() {
          // TODO Auto-generated method stub
          return null;
      }
  
      public String getCmd() {
          return cmd;
      }
  
      public void setCmd(String cmd) {
          this.cmd = cmd;
      }
      public String getSuccess() {
          return success;
      }
  
      public void setSuccess(String success) {
          this.success = success;
      }
  
      public String getNumberOfVideos() {
          return numberofvideos;
      }
      public void setNumberOfVideos(String numberofvideos) {
          this.numberofvideos = numberofvideos;
      }
      public List&lt;Cmd&gt; getVideos() {
          return videos;
      }
      public void setVideos(String videos) {
          this.videos = videos;
      }
      public String getVideo() {
          return video;
      }
      public void setVideo(String video) {
          this.video = video;
      }
      public String getVideoName() {
          return videoname;
      }
  
      public void setVideoName(String videoname) {
          this.videoname = videoname;
      }
      public String getVideoURL() {
          return videourl;
      }
  
      public void setVideoURL(String videourl) {
          this.videourl = videourl;
      }
  
      @Override
      public int getCount() {
          return videos.size();
      }
  
      @Override
      public Object getItem(int position) {
          return videos.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          return position;
      }   
  }
  </code></pre>
  <h2>SAXXMLHandler.java</h2>
  <pre><code>public class SAXXMLHandler extends DefaultHandler {
      private List&lt;Cmd&gt; videos;
      private String tempVal;
      // to maintain context
      private Cmd cmd;
   
      public SAXXMLHandler() {
          videos = new ArrayList&lt;Cmd&gt;();
      }
   
      public List&lt;Cmd&gt; getResponse() {
          return videos;
      }
   
      // Event Handlers
      public void startElement(String uri, String localName, String qName,
              Attributes attributes) throws SAXException {
          // reset
          tempVal = &quot;&quot;;
          if (qName.equalsIgnoreCase(&quot;cmd&quot;)) {
              // create a new instance of cmd
              cmd = new Cmd();
  
          }
      }
   
      public void characters(char[] ch, int start, int length)
              throws SAXException {
          tempVal = new String(ch, start, length);
      }
   
      public void endElement(String uri, String localName, String qName)
              throws SAXException {
   
          if (qName.equalsIgnoreCase(&quot;videos&quot;)) {
              // add it to the list
              videos.add(cmd);
          } else if (qName.equalsIgnoreCase(&quot;success&quot;)) {
              cmd.setSuccess(tempVal);
          } else if (qName.equalsIgnoreCase(&quot;numberofvideos&quot;)) {
              cmd.setNumberOfVideos(tempVal);
          } else if (qName.equalsIgnoreCase(&quot;videos&quot;)) {
              cmd.setVideos(tempVal);
          } else if (qName.equalsIgnoreCase(&quot;video&quot;)) {
              cmd.setVideo(tempVal);
          } else if (qName.equalsIgnoreCase(&quot;videoname&quot;)) {
              cmd.setVideoName(tempVal);
          } else if (qName.equalsIgnoreCase(&quot;videourl&quot;)) {
              cmd.setVideoURL(tempVal);
         
          }
      }
  }
  </code></pre>