保存一些数据后,我一直在尝试返回活动。保存所有作品找到。那里没有错误,所有流都已关闭。然后我尝试回到 MainMenu 活动,它似乎不起作用。还有一些我不知道它是否会影响它的东西,但是如果我在课堂上创建了一些 TextFields,我是否需要在进行新活动之前删除它们?
("com.sureclean.versionio.settings") 中新活动的代码:
public void onClick(View v) {
//Saving data code in here
startActivity(new Intent("com.sureclean.versionioo.MainMenu"));
}
整个清单:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sureclean.versionioo"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Splash"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainMenu"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="com.sureclean.versionioo.MainMenu" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".checklist"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name=".checklist" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".settings"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="com.sureclean.versionioo.settings" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
日志猫:
09-12 15:58:03.949: E/AndroidRuntime(1079): FATAL EXCEPTION: main
09-12 15:58:03.949: E/AndroidRuntime(1079): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.surehere.versionioo.MAIN }
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1384)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.app.Activity.startActivityForResult(Activity.java:3190)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.app.Activity.startActivity(Activity.java:3297)
09-12 15:58:03.949: E/AndroidRuntime(1079): at com.sureclean.versionioo.settings$1.onClick(settings.java:54)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.view.View.performClick(View.java:3511)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.view.View$PerformClick.run(View.java:14105)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.os.Handler.handleCallback(Handler.java:605)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.os.Handler.dispatchMessage(Handler.java:92)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.os.Looper.loop(Looper.java:137)
09-12 15:58:03.949: E/AndroidRuntime(1079): at android.app.ActivityThread.main(ActivityThread.java:4424)
09-12 15:58:03.949: E/AndroidRuntime(1079): at java.lang.reflect.Method.invokeNative(Native Method)
09-12 15:58:03.949: E/AndroidRuntime(1079): at java.lang.reflect.Method.invoke(Method.java:511)
09-12 15:58:03.949: E/AndroidRuntime(1079): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
09-12 15:58:03.949: E/AndroidRuntime(1079): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
09-12 15:58:03.949: E/AndroidRuntime(1079): at dalvik.system.NativeStart.main(Native Method)