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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T22:17:25+00:00 2026-06-18T22:17:25+00:00

I have a small app that i have been working on. I wanted a

  • 0

I have a small app that i have been working on. I wanted a fresh install to run from on my Galaxy Nexus rooted running 4.2.1. I uninstalled the app, then tried to reinstall it via eclipse. It installs fine, no errors in logcat, console ect… but when you click to run the app, it just closes right on opening. I have tried this on 2 different phones, same thing.

On the Galaxy Nexus, if I restore my ROM back before I uninstalled, I can run it from eclipse all I want. It’s only after uninstall and reinstall that I get the force close. It is installed on the ROM backup.

Any ideas?! How can I find out what is going on here?

EDIT:::

Activity is only declared once in manifest…

Tried changing the version number… no effect

added some Log.e() to the MainActivity:

protected void onCreate(Bundle savedInstanceState) {
        Log.e(TAG,"STARTING APP");
        super.onCreate(savedInstanceState);
        // show no back arrow
        Log.e(TAG,"AFTER ONCREATE");
        setContentView(R.layout.activity_firstload);
        Log.e(TAG,"AFTER SETCONTENTVIEW");

        getPrefs();
        Log.e(TAG,"GET PREFS");
        finish();
        Log.e(TAG,"AFTER FINISH");
    }

The only tag that shows in the LogCat is “AFTER FINISH”

If I get rid of finish, the MainActivity stays open. All that main activity does is check for Preferences. Here is my GetPrefs()

private void getPrefs() {
        // Get the xml/preferences.xml preferences
        Log.e(TAG,"GET PREFS 1");
        SharedPreferences prefs = PreferenceManager
                .getDefaultSharedPreferences(getBaseContext());
        lp = prefs.getString("defaultreport", "");
        Log.v(TAG, lp);

        if (lp.equals("esac")) {
//          Toast.makeText(MainActivity.this, "ESAC", Toast.LENGTH_SHORT)
//                  .show();
            Intent i = new Intent(MainActivity.this, ESACActivity.class);
            startActivity(i);
        } else if (lp.equals("sac")) {
//          Toast.makeText(MainActivity.this, "SAC", Toast.LENGTH_SHORT)
//                  .show();
            Intent i = new Intent(MainActivity.this, SACActivity.class);
            startActivity(i);
        } else if (lp.equals("msar")) {
//          Toast.makeText(MainActivity.this, "MSAR", Toast.LENGTH_SHORT)
//                  .show();
            Intent i = new Intent(MainActivity.this, MSARActivity.class);
            startActivity(i);
        }

    }

AH>>> May have found something. The preferences initially are set to “” (null) so what would it load?! So I need a screen asking which they’d like to set on FIRST RUN I guess…

EDIT EDIT::: Needed to check for first run in Prefs…

if (prefs.getString("defaultreport", null) == null)
        {
            startActivity(new Intent(this, Preferences.class));
            return;
        }
  • 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-18T22:17:26+00:00Added an answer on June 18, 2026 at 10:17 pm

    Your string that decides what to run is set to nothing if there is no preference.

    lp = prefs.getString("defaultreport", "");
    

    And since you have no option for that case nothing will run and the initial activity will close without starting any other.

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

Sidebar

Related Questions

I have a small app I have been working on that uses the front
I have a small app that downloads some files from a remote (HTTP) server
I have been working on a small app and at some point while creating
I have a small .NET app that I'm running under Windows 2008 Server via
I have a small app that uses cocos2d to run through four levels of
I am new to ios app development I have been working on a small
I'm working in a small company and weeks away from deploying a web-app that
I have a small open source OSX project I've been working on that I'd
I have been working on a small web app using the Stripes framework. Now
I have small web app that generate PDF files as a report. I'm trying

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.