title: Error:(66, 27) error: constructor LineData in class LineData cannot be applied to given types; required: ILineDataSet[] found: String[],
body: <p>I was following the example on youtube, <a href="https://www.youtube.com/watch?v=TNeE9DJoOMY&amp;t=614s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=TNeE9DJoOMY&amp;t=614s</a>, Creating a Line Graph with multiple data sets in Android Studio. I believe the code is correct... but still getting error: constuctor LineData error.. Another post on stackoverflow suggested that maybe the MPandroidChart library may have changed requiring a different input?  The full error is:</p>
  
  <pre><code>Error:(66, 27) error: constructor LineData in class LineData cannot be applied to given types;
  required: ILineDataSet[]
  found: String[],LineDataSet
  reason: varargs mismatch; String[] cannot be converted to ILineDataSet
  </code></pre>
  
  <p>Here is my main code:</p>
  
  <pre><code>package com.example.rj.linegraph1;
  
  import android.graphics.Color;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  
  import com.github.mikephil.charting.charts.LineChart;
  import com.github.mikephil.charting.data.Entry;
  import com.github.mikephil.charting.data.LineData;
  import com.github.mikephil.charting.data.LineDataSet;
  import com.github.mikephil.charting.interfaces.datasets.ILineDataSet;
  
  import java.util.ArrayList;
  
  public class MainActivity extends AppCompatActivity {
  
      LineChart lineChart;
  
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          lineChart = (LineChart) findViewById(R.id.lineChart);
  
          ArrayList&lt;String&gt; xAXIS = new ArrayList&lt;&gt;();
          ArrayList&lt;Entry&gt; yAXISsin = new ArrayList&lt;&gt;();
          ArrayList&lt;Entry&gt; yAXIScos = new ArrayList&lt;&gt;();
  
          double x = 0;
          int numDataPoints = 1000;
  
          for (int i = 0; i &lt; numDataPoints; i++) {
              float sinFunction = Float.parseFloat(String.valueOf(Math.sin(x)));
              float cosFunction = Float.parseFloat(String.valueOf(Math.cos(x)));
              x = x + 0.1;
              yAXISsin.add(new Entry(sinFunction,i));
              yAXIScos.add(new Entry(cosFunction,i));
  
              xAXIS.add(i, String.valueOf(x));
  
  
          }
  
          String[] xaxis = new String[xAXIS.size()];
  
          for(int i = 0; i &lt; xAXIS.size(); i++) {
              xaxis[i] = xAXIS.get(i).toString();
  
  
  
          }
  
          ArrayList&lt;ILineDataSet&gt; lineDataSets = new ArrayList&lt;&gt;();
          LineDataSet lineDataSet1 = new LineDataSet(yAXIScos,"cos");
          lineDataSet1.setDrawCircles(false);
          lineDataSet1.setColors(Color.BLUE);
          LineDataSet lineDataSet2 = new LineDataSet(yAXISsin,"sin");
          lineDataSet2.setDrawCircles(false);
          lineDataSet2.setColors(Color.RED);
  
          lineDataSets.add(lineDataSet1);
          lineDataSets.add(lineDataSet2);
  
          lineChart.setData(new LineData(xaxis,lineDataSets));
          lineChart.setVisibleXRangeMaximum(65f);
  
  
  
  
  
      }
  }
  </code></pre>