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 6104217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:49:00+00:00 2026-05-23T13:49:00+00:00

When i run the app it crashes with a ZygoteInit$methodandargscaller.run() source not found error

  • 0

When i run the app it crashes with a “ZygoteInit$methodandargscaller.run() source not found” error and a few other “source not found”. It also says something about a nullpointerexception
It crashes one the line: tap[0] = (int) (System.nanoTime() / 1000000 – tapstart);

package com.metronome;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.Editable;
import android.view.View;
import android.widget.Button;
import android.widget.CompoundButton;
import android.widget.CompoundButton.OnCheckedChangeListener;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.SeekBar;
import android.widget.SeekBar.OnSeekBarChangeListener;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.ToggleButton;

public class MetronomeActivity extends Activity {

public int bpm = 150;
private long tapstart = 0;
private int tap[];
private int cnt = 0;
private int gnstap = 0;
private int sum;

FrameLayout mainFrame;
SeekBar Bar;
TextView bpmText;
ToggleButton toggle;
MediaPlayer mp;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    mainFrame = (FrameLayout) findViewById(R.id.FrameLayout);
    Bar = (SeekBar) findViewById(R.id.seekBar1);
    bpmText = (TextView) findViewById(R.id.textView1);
    toggle = (ToggleButton) findViewById(R.id.toggleButton1);

    bpmText.setText(bpm + " BPM");

    // listeners

    mainFrame.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
            if (tapstart != 0) {

                tap[0] = (int) (System.nanoTime() / 1000000 - tapstart);
                tapstart = (System.nanoTime() / 1000000);
                if (cnt < 9) {
                    cnt++;
                } else {
                    cnt = 0;
                }
                sum = 0;
                for(int i=0; i < tap.length ; i++)
                    sum = sum + tap[i];

                gnstap = sum/tap.length;
                bpm = 60000/gnstap;
                bpmText.setText(bpm + " BPM");
            } 
            else {
                tapstart = (System.nanoTime() / 1000000);
            }
        }
    });
}
}
  • 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-05-23T13:49:00+00:00Added an answer on May 23, 2026 at 1:49 pm

    You have not created your tap[] array. You have declared it, but you need to create it using tap = new int[9] before you can access it.

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

Sidebar

Related Questions

I'm getting an error in my Android app that says source not found and
I did a grails clean and afterwards when I run via grails run-app the
When I run my app with Leaks and view the Extended Details for any
Can a LINQ enabled app run on a machine that only has the .NET
I'd like to run an app in the KIOSK mode, so that it auto-starts
Just wondering if anybody has run Scala app or web-app on Java Real-Time system?
Is there a difference in double size when I run my app on 32
This happens after I hit Build and Go to run my app on my
i create some project but when start App. How to Run this App one
If I drop a UIDatePicker onto a UIView in IB and run the app,

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.