getFilesDir() returning null
<p>GetFilesDir() is returning null, which is completely bizarre. What's worse, is my code is...painfully simple:</p>

<pre><code>public class main extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    File f = this.getFilesDir();
    f.getAbsolutePath();

    tempClicked((ToggleButton)findViewById(R.id.tempToggle));
}
</code></pre>

<p>This will crash on f.getAbsolutePath(). It's currently running in the emulator emulating a 2.3.3 system at 1024x600. </p>

<p>Google returns nothing on this...so why on earth is this happening? And how do I fix it?!</p>

<p>Thanks a lot!</p>

<p><strong>EDIT:: SOLVED!</strong></p>

<p>Well, somewhat...</p>

<p>I think it turned out to be an emulator error. I changed the skin of the emulator to WXVGA, and that then allowed it to write the files correctly. And when I then changed the resolution back to 1024x600 it kept working correctly.</p>

<p>So, if anyone has a similar error, I suggest you play around with the emulator until you find a way past the bug.</p>
