Android app closes automatically right after lauching
<p>I am writing an android app and testing in on my own phone. It's working properly except that sometimes after I click the icon, the app shows up for half a second and then closes. The weird things are:</p>

<ol>
<li>It only happens about once in 20 times.</li>
<li>When it crashes, if you try to re-open the app it will crash too. You have to do something else (like using another app) before you can open the app normally.</li>
<li>When it crashes, if you try to open some other cheap apps they will crash too. (But not those decent ones like "Angry Bird")</li>
</ol>

<p>Following are my configuration settings:</p>

<ul>
<li>The app is written in Android 1.6. (A survey says there are still 30% Android phones are on 1.6, so I chose the lowest version possible.)</li>
<li>The OS version on my phone is Android 2.1</li>
<li>My phone is Samsung Galaxy I9000</li>
</ul>

<p>I suspect the problem might have something to do with the OS version or even device type. Has anyone experienced this problem before? The app is still OK to use, but this is a really bad user experience.</p>

<p>Thanks,</p>

<hr>

<p>I attached my phone to Logcat as suggested, but it just got weirder. When the app is running, I can see the log is updating and everything is fine. When it crashes, all the log information in Logcat console is gone. There is only one line with tag “WindowManager” left saying:</p>

<p>"Delivering key 4 to Window{ ...}"</p>

<p>And the time column is changing quickly. I assume it means I am keep pressing cancel button, which I am not. Does anyone has experience with this？</p>

<p>Thanks,</p>
