I am currently developing an Android 2.2 application that needs to resume to the main activity from another one.
I am using this code:
private void btnAbort_OnClick(View v)
{
startActivity(new Intent(v.getContext(), Main.class));
finish();
}
but when I call the method (by clicking a button) I get the following error:
02-02 20:05:19.117: E/dalvikvm(864): Unable to open stack trace file ‘/data/anr/traces.txt’: Permission denied
What is going wrong here?
Edit:
Manifest code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.game"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="7" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".Main"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".SingleplayerActivity"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="eu.game.SINGLEPLAYERACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
I fixed the problem by creating a new thread for the second activity. Thanks for all your help.