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

  • Home
  • SEARCH
  • 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 8477559
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:30:03+00:00 2026-06-10T18:30:03+00:00

Trying to downgrade my appl from android 2.2 (API 8) down to android 2.1

  • 0

Trying to downgrade my appl from android 2.2 (API 8) down to android 2.1 (API7), I’m facing some issues with dialog boxes. Based on this thread, I’m trying to catch these exceptions but can’t override the showDialog method.

I turned the Java compiler from 1.5 to 1.6 according to this answer to a similar issue, but no changes, Eclipse still returns :

Cannot override the final method from Activity

public class MyActivity extends Activity implements
        SeekBar.OnSeekBarChangeListener {


// ... some stuffs

    @Override // here is the issue
    public void showDialog(int dialogId) {
        try {
            super.showDialog(dialogId);
        } catch (IllegalArgumentException e) {
            Log.e(ACTIVITY_TAG, "Error dialog");
        }
    }
    @Override
    protected Dialog onCreateDialog(int id) {

        switch (id) {
        case DIALOG_ALERT:
            // Create out AlertDialog
            Builder builder = new AlertDialog.Builder(this);
            builder.setMessage(msg);
            builder.setCancelable(false);
            builder.setPositiveButton(GOTO_BOOK, new OkOnClickListener());
            builder.setNegativeButton(STAY_HERE, new CancelOnClickListener());
            AlertDialog dialog = builder.create();
            dialog.show();
            break;
        case DIALOG_ONCREATE:
            // Create out AlertDialog during the "onCreate" method (only "Ok"
            // button)
            Builder builder2 = new AlertDialog.Builder(getParent());
            builder2.setMessage(msg);
            builder2.setCancelable(false);
            builder2.setPositiveButton(GO_BACK, new OkOnClickListener());

            AlertDialog dialog2 = builder2.create();
            dialog2.show();
            break;
        }

        return super.onCreateDialog(id);

    }

    // ... some stuffs

    }
  • 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-10T18:30:05+00:00Added an answer on June 10, 2026 at 6:30 pm

    onCreateDialog should not show the dialog , show part will be done by framework. All you need to do is return the correct dialog.

    Remove the override part. You dont need a workaround for this issue. There is problem in your code

    Remove

    dialog.show();
    

    Also Instead of this

    return super.onCreateDialog(id);
    

    use

    return dialog;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to find some information on this but am unable to get any results
Trying to launch and pass tel. no. to skype by this code from my
Trying to select a random row from a table, based on autoincremented primary key
I have passed the last couple of hours trying to downgrade Java to 1.6.0_13
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to figure out how I can do this properly. The print_r looks like
trying to figure out why this is happening - I have an input text
Currently, I am running Mint Linux (Release 9). I need to downgrade Java from
Trying to pull a value from the sunrise element from [yweather:astronomy] in the Yahoo
Trying to read registry keys remotly (from a host on local intranet)... All the

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.