Android - exception when compiling and running the application
<p>I am running a debug android application with eclipse and the simulator, and on a restarting of the app, I get this exception,</p>

<pre><code>03-23 02:19:51.384: E/AndroidRuntime(605): FATAL EXCEPTION: main
03-23 02:19:51.384: E/AndroidRuntime(605): java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.NullPointerException
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.app.LoadedApk.makeApplication(LoadedApk.java:482)
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3938)
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.app.ActivityThread.access$1300(ActivityThread.java:123)
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1185)
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.os.Handler.dispatchMessage(Handler.java:99)
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.os.Looper.loop(Looper.java:137)
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.app.ActivityThread.main(ActivityThread.java:4424)
03-23 02:19:51.384: E/AndroidRuntime(605):  at java.lang.reflect.Method.invokeNative(Native Method)
03-23 02:19:51.384: E/AndroidRuntime(605):  at java.lang.reflect.Method.invoke(Method.java:511)
03-23 02:19:51.384: E/AndroidRuntime(605):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
03-23 02:19:51.384: E/AndroidRuntime(605):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
03-23 02:19:51.384: E/AndroidRuntime(605):  at dalvik.system.NativeStart.main(Native Method)
03-23 02:19:51.384: E/AndroidRuntime(605): Caused by: java.lang.NullPointerException
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:362)
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.app.LoadedApk.getClassLoader(LoadedApk.java:305)
03-23 02:19:51.384: E/AndroidRuntime(605):  at android.app.LoadedApk.makeApplication(LoadedApk.java:474)
03-23 02:19:51.384: E/AndroidRuntime(605):  ... 11 more
</code></pre>

<p>But this doesn't really say where the error happened in my code.  Any idea why this might be happening and how to prevent it?</p>

<p>and this is the entire manifest of the small application:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.problemio"
    android:versionCode="1"
    android:versionName="1.0" &gt;

    &lt;uses-sdk android:minSdkVersion="15" /&gt;

    &lt;uses-permission android:name="android.permission.INTERNET" /&gt;

    &lt;application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" &gt;
        &lt;activity
            android:name=".ProblemioActivity"
            android:label="@string/app_name" &gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;

                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;

        &lt;activity
            android:name=".AddProblemActivity"
            android:label="@string/add_problem" /&gt;

        &lt;activity
            android:name=".LoginActivity"
            android:label="@string/login" /&gt;        

        &lt;activity
            android:name=".MyProblemsActivity"
            android:label="@string/your_problems" /&gt; 

        &lt;activity
            android:name=".LogoutActivity"
            android:label="@string/app_name" /&gt; 

        &lt;activity
            android:name=".CreateProfileActivity"
            android:label="@string/create_account" /&gt;         

        &lt;activity
            android:name=".ProblemActivity"
            android:label="@string/problem_page_header" /&gt;   

        &lt;activity
            android:name=".SuggestSolutionActivity"
            android:label="@string/suggest_solution_header" /&gt;  

        &lt;activity
            android:name=".SuggestedSolutionActivity"
            android:label="@string/suggested_solution_header" /&gt;          

        &lt;activity
            android:name=".ViewSolutionsActivity"
            android:label="@string/view_solutions_header" /&gt;        

        &lt;activity
            android:name=".TopicActivity"
            android:label="@string/topic_header" /&gt; 

    &lt;/application&gt;

&lt;/manifest&gt;
</code></pre>

<p>Thanks!</p>
