Developing Android App Installs fine after Uninstall will Not Reinstall
<p>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. </p>

<p>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. </p>

<p>Any ideas?! How can I find out what is going on here? </p>

<p>EDIT::: </p>

<p>Activity is only declared once in manifest... </p>

<p>Tried changing the version number... no effect</p>

<p>added some Log.e() to the MainActivity:</p>

<pre><code>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");
    }
</code></pre>

<p>The only tag that shows in the LogCat is "AFTER FINISH"</p>

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

<pre><code>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);
        }

    }
</code></pre>

<p>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... </p>

<p>EDIT EDIT::: Needed to check for first run in Prefs...</p>

<pre><code>if (prefs.getString("defaultreport", null) == null)
        {
            startActivity(new Intent(this, Preferences.class));
            return;
        }
</code></pre>
