Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8953643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:08:41+00:00 2026-06-15T14:08:41+00:00

I am trying to compile code the once worked a month ago, but for

  • 0

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.

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();
}

}

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.test"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

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

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

</manifest>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:08:42+00:00Added an answer on June 15, 2026 at 2:08 pm

    Try to use

    • Android Tools -> Fix Project Properties

    If it does not solve the problem please try

    • Project -> Clean

    I have run your Activity on my device and it worked without an error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to compile a code that has a include directory with some
I'm trying to compile some code which contains the following declaration, because I would
I'm currently trying to compile some code examples from http://developer.gnome.org/gtkmm-tutorial/unstable/sec-treeview-examples.html.en but from what I
I am trying to compile some code on linux that I KNOW compiles on
I'm trying to understand the following code: Pattern.compile((.*?):) I already did some research about
I am trying to compile code that works on os x and linux using
When trying to compile this code: #include <iostream> #include <vector> using namespace std; class
I trying to compile this code: Int64 itag = BitConverter.ToInt64(temp, 0); itag &= 0xFFFFFFFFFFFFFC00;
I am trying to compile a code that uses Boost's zlib wrappers. However, no
I'm trying to compile fortran code given to me by a labmate to run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.