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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:21:13+00:00 2026-06-15T02:21:13+00:00

Yesterday it worked perfectly, but today shows a message unfortunately the app has stopped,

  • 0

Yesterday it worked perfectly,
but today shows a message
“unfortunately the app has stopped”,
and the logcat shows “shutting down the VM”.

Stack Trace of this app..

11-27 13:24:17.035: W/Trace(806): Unexpected value from nativeGetEnabledTags: 0
11-27 13:24:17.455: W/Trace(806): Unexpected value from nativeGetEnabledTags: 0
11-27 13:24:17.485: W/Trace(806): Unexpected value from nativeGetEnabledTags: 0
11-27 13:24:17.485: D/AndroidRuntime(806): Shutting down VM
11-27 12:30:51.683: D/AndroidRuntime(734): Shutting down VM
11-27 12:30:51.943: D/dalvikvm(734): GC_CONCURRENT freed 137K, 9% free 2625K/2880K,paused23ms+7ms, total 230ms
11-27 12:37:12.259: D/dalvikvm(878): newInstance failed: p0 i0 [0 a1
11-27 12:37:12.259: D/AndroidRuntime(878): Shutting down VM
11-27 12:43:22.839: D/dalvikvm(939): newInstance failed: p0 i0 [0 a1
11-27 12:43:22.878: D/AndroidRuntime(939): Shutting down VM

this is program..

package com.raghuram.simplecalculator;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.Toast;

public abstract class CalculatorActivity extends Activity 
{

    @Override
    protected void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_calculator);
        OnClickListener addlisten= new OnClickListener()
        {
            public void onClick(View v) 
                {
                    EditText tx1=(EditText) findViewById(R.id.editText1);
                    EditText tx2=(EditText) findViewById(R.id.editText2);
                    EditText tx3=(EditText) findViewById(R.id.editText3);
                    Float res=Float.parseFloat(tx1.getText().toString()) + Float.parseFloat(tx2.getText().toString());                  
                    tx3.setText(Float.toString(res));


                }
        };

        ImageButton a=(ImageButton) findViewById(R.id.imageButton1);
        a.setOnClickListener(addlisten);

        OnClickListener sublisten= new OnClickListener()
        {
            public void onClick(View v) 
                {
                    EditText tx1=(EditText) findViewById(R.id.editText1);
                    EditText tx2=(EditText) findViewById(R.id.editText2);
                    EditText tx3=(EditText) findViewById(R.id.editText3);                   
                    Float res1=Float.parseFloat(tx1.getText().toString()) - Float.parseFloat(tx2.getText().toString());                 
                    tx3.setText(Float.toString(res1));

                }
        };

        ImageButton s=(ImageButton) findViewById(R.id.imageButton2);
        s.setOnClickListener(sublisten);

        OnClickListener mullisten= new OnClickListener()
        {
            public void onClick(View v) 
                {
                    EditText tx1=(EditText) findViewById(R.id.editText1);
                    EditText tx2=(EditText) findViewById(R.id.editText2);
                    EditText tx3=(EditText) findViewById(R.id.editText3);                   
                    Float res1=Float.parseFloat(tx1.getText().toString()) * Float.parseFloat(tx2.getText().toString());                 
                    tx3.setText(Float.toString(res1));

                }
        };

        ImageButton m=(ImageButton) findViewById(R.id.imageButton3);
        m.setOnClickListener(mullisten);

        OnClickListener divlisten= new OnClickListener()
        {
            public void onClick(View v) 
                {
                    EditText tx1=(EditText) findViewById(R.id.editText1);
                    EditText tx2=(EditText) findViewById(R.id.editText2);
                    EditText tx3=(EditText) findViewById(R.id.editText3);
                    Float x=Float.parseFloat(tx2.getText().toString());

                        if(x>0)
                        {
                            Float res1=Float.parseFloat(tx1.getText().toString()) / Float.parseFloat(tx2.getText().toString());                 
                            tx3.setText(Float.toString(res1));
                        }
                        else
                        {

                            Context context = getApplicationContext();
                            CharSequence text = "Invalid number.";
                            int duration = Toast.LENGTH_SHORT;

                            Toast toast = Toast.makeText(context, text, duration);
                            toast.show();

                        }

                }




        };

        ImageButton d=(ImageButton) findViewById(R.id.imageButton4);
        d.setOnClickListener(divlisten);


        ImageButton e=(ImageButton) findViewById(R.id.imageButton5);        
        e.setOnClickListener(new OnClickListener()
        {

            @Override
            public void onClick(View v) 
            {

                System.exit(0);
            }

        });

    }





    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_calculator, menu);
        return true;
    }

}

It shows the exact results yesterday, but now it closed forcely..
how to manage the memory.

  • 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-15T02:21:14+00:00Added an answer on June 15, 2026 at 2:21 am

    Remove the abstract before your class name.

    And true to stop your activity by calling finish() instead of System.exit(0).

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

Sidebar

Related Questions

Running this (bundle exec rspec spec/requests/static_pages_spec.rb) worked fine yesterday, but today when I go
Since yesterday it worked, but this morning, I can't figure out why, my app
The following file worked yesterday, but today it isn't working any more. Could be
I am developing an app on facebook. Since yesterday the resizing worked fine with
I'm sure my app worked right until yesterday, when I got this error: Failed
Ok, I am very confused. Yesterday it worked just fine. Today suddenly I start
I have problem with my own Subversion repository. It worked yesterday. But I received
Yesterday I installed feedparser (on OSX 10.5) and it worked fine, but now it
Yesterday I asked this question, and the solution posted by @JB Nizet worked perfectly.
I built a web app where I'm using the Google API. Yesterday it worked

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.