Getting Errors while compiling Android App
<p>I am trying to compile code the once worked a month ago, but for some reason I started it up again in eclipse and now I am receiving these weird errors. I am making an application that takes in accelerometer data and displays it in a visual format with a graph and such just do it. It's become quite a headache as I feel eclipse isn't cooperating with me.</p>

<pre><code>12-03 14:17:30.046: E/AndroidRuntime(368): FATAL EXCEPTION: main
12-03 14:17:30.046: E/AndroidRuntime(368): java.lang.VerifyError:     com.example.test.Activity2
12-03 14:17:30.046: E/AndroidRuntime(368):  at java.lang.Class.newInstanceImpl(Native Method)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at java.lang.Class.newInstance(Class.java:1409)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at android.os.Handler.dispatchMessage(Handler.java:99)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at android.os.Looper.loop(Looper.java:123)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at android.app.ActivityThread.main(ActivityThread.java:3683)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at java.lang.reflect.Method.invokeNative(Native Method)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at java.lang.reflect.Method.invoke(Method.java:507)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    12-03 14:17:30.046: E/AndroidRuntime(368):  at dalvik.system.NativeStart.main(Native Method)




package com.example.test;

import java.util.Date;

import org.achartengine.ChartFactory;
import org.achartengine.GraphicalView;
import org.achartengine.chart.PointStyle;
import org.achartengine.model.TimeSeries;
import org.achartengine.model.XYMultipleSeriesDataset;
import org.achartengine.renderer.XYMultipleSeriesRenderer;
import org.achartengine.renderer.XYSeriesRenderer;

import android.app.Activity;
import android.graphics.Color;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorManager;
import android.os.Bundle;


public class Activity2 extends Activity implements SensorEventListener{


private static TimeSeries[] timeSeries;
private static XYMultipleSeriesDataset dataset;
private static XYMultipleSeriesRenderer renderer;
private static XYSeriesRenderer rendererSeries;
private static GraphicalView view;
private static Thread mThread;
private SensorManager sensorManager;
float x;
float y;
float z;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);     

   // generateCsvFile("Example1.csv");

    sensorManager=(SensorManager)getSystemService(SENSOR_SERVICE);
    sensorManager.registerListener(this,
            sensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER),
            SensorManager.SENSOR_DELAY_NORMAL);

    dataset = new XYMultipleSeriesDataset();

    renderer = new XYMultipleSeriesRenderer();
    renderer.setAxesColor(Color.BLUE);
    renderer.setAxisTitleTextSize(16);
    renderer.setChartTitle("Time");
    renderer.setChartTitleTextSize(15);
    renderer.setFitLegend(true);
    renderer.setGridColor(Color.LTGRAY);
    renderer.setPanEnabled(false, false);
    renderer.setPointSize((float)0.25);
    renderer.setXTitle("Time");
    renderer.setYTitle("XYZ");
    renderer.setMargins( new int []{20, 30, 15, 0});
    renderer.setZoomButtonsVisible(false);
    renderer.setBarSpacing(4);
    renderer.setShowGrid(true);


    rendererSeries = new XYSeriesRenderer();
    rendererSeries.setColor(Color.RED);
    rendererSeries.setFillPoints(true);
    rendererSeries.setPointStyle(PointStyle.CIRCLE);
    renderer.addSeriesRenderer(rendererSeries);
    rendererSeries = new XYSeriesRenderer();
    rendererSeries.setColor(Color.BLUE);
    rendererSeries.setFillPoints(true);
    rendererSeries.setPointStyle(PointStyle.CIRCLE);
    renderer.addSeriesRenderer(rendererSeries);
    rendererSeries = new XYSeriesRenderer();
    rendererSeries.setColor(Color.GREEN);
    rendererSeries.setFillPoints(true);
    rendererSeries.setPointStyle(PointStyle.CIRCLE);
    renderer.addSeriesRenderer(rendererSeries);

    timeSeries = new TimeSeries[3];
    timeSeries[0] = new TimeSeries("Random 0");
    timeSeries[1] = new TimeSeries("Random 1");
    timeSeries[2] = new TimeSeries("Random 2");
    timeSeries[0].add(new Date(), x);
    timeSeries[1].add(new Date(), y);
    timeSeries[2].add(new Date(), z);

}
/*private static void generateCsvFile(String sFileName)
{
    try
    {
        File root = Environment.getExternalStorageDirectory();
        File gpxfile = new File(root, sFileName);
        FileWriter writer = new FileWriter(gpxfile);

        writer.append("Emp_Name");
        writer.append(',');
        writer.append("Adress");
        writer.append('\n');

        writer.append("hussain");
        writer.append(',');
        writer.append("Delhi");
        writer.append('\n');

        //generate whatever data you want

        writer.flush();
        writer.close();
    }
    catch(IOException e)
    {
        e.printStackTrace();
    } 
 }
 */
public void onAccuracyChanged(Sensor sensor,int accuracy){

}

public void onSensorChanged(SensorEvent event){

    // check sensor type
    if(event.sensor.getType()==Sensor.TYPE_ACCELEROMETER){

        // assign directions
        x=event.values[0];
        y=event.values[1];
        z=event.values[2];
    }
}


@Override
protected void onStart() {
    super.onStart();
    dataset.addSeries(timeSeries[0]);
    dataset.addSeries(timeSeries[1]);
    dataset.addSeries(timeSeries[2]);
    view = ChartFactory.getTimeChartView(this, dataset, renderer, "Test");
    view.refreshDrawableState();
    view.repaint();
    setContentView(view);
    mThread = new Thread(){
        public void run(){
            while(true){
            try {
                Thread.sleep(300L);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
                timeSeries[0].add(new Date(), x);
                timeSeries[1].add(new Date(), y);
                timeSeries[2].add(new Date(), z);
                view.repaint();
            }
        }
    };
    mThread.start();
}
</code></pre>

<p>}</p>

<pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" &gt;

&lt;uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" /&gt;

&lt;application
    android:debuggable="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" &gt;
    &lt;activity
        android:name=".MainActivity" &gt;
        &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;

            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
        &lt;/intent-filter&gt;
    &lt;/activity&gt;
    &lt;activity
        android:name=".Activity2"
        android:label="@string/title_activity_activity2" &gt;
        &lt;meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value="com.example.test.MainActivity" /&gt;
    &lt;/activity&gt;
&lt;/application&gt;

&lt;/manifest&gt;
</code></pre>
