08-26 10:28:32.383: E/AndroidRuntime(11988): FATAL EXCEPTION: main
08-26 10:28:32.383: E/AndroidRuntime(11988): Process: cn.com.vargo.ivargosetupwizard, PID: 11988
08-26 10:28:32.383: E/AndroidRuntime(11988): android.content.ActivityNotFoundException: Unable to find explicit activity class {cn.com.vargo.ivargosetupwizard/cn.com.vargo.ivargosetupwizard.SetupWizardActivity}; have you declared this activity in your AndroidManifest.xml?
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Activity.startActivityForResult(Activity.java:3424)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Activity.startActivityForResult(Activity.java:3385)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Activity.startActivity(Activity.java:3627)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Activity.startActivity(Activity.java:3595)
08-26 10:28:32.383: E/AndroidRuntime(11988): at cn.com.vargo.ivargosetupwizard.WelcomActivity.finishSetup(WelcomActivity.java:105)
08-26 10:28:32.383: E/AndroidRuntime(11988): at cn.com.vargo.ivargosetupwizard.WelcomActivity$1.onClick(WelcomActivity.java:126)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.view.View.performClick(View.java:4438)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.view.View$PerformClick.run(View.java:18422)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.os.Handler.handleCallback(Handler.java:733)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.os.Handler.dispatchMessage(Handler.java:95)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.os.Looper.loop(Looper.java:136)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.ActivityThread.main(ActivityThread.java:5017)
08-26 10:28:32.383: E/AndroidRuntime(11988): at java.lang.reflect.Method.invokeNative(Native Method)
08-26 10:28:32.383: E/AndroidRuntime(11988): at java.lang.reflect.Method.invoke(Method.java:515)
08-26 10:28:32.383: E/AndroidRuntime(11988): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
08-26 10:28:32.383: E/AndroidRuntime(11988): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
08-26 10:28:32.383: E/AndroidRuntime(11988): Process: cn.com.vargo.ivargosetupwizard, PID: 11988
08-26 10:28:32.383: E/AndroidRuntime(11988): android.content.ActivityNotFoundException: Unable to find explicit activity class {cn.com.vargo.ivargosetupwizard/cn.com.vargo.ivargosetupwizard.SetupWizardActivity}; have you declared this activity in your AndroidManifest.xml?
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Activity.startActivityForResult(Activity.java:3424)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Activity.startActivityForResult(Activity.java:3385)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Activity.startActivity(Activity.java:3627)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.Activity.startActivity(Activity.java:3595)
08-26 10:28:32.383: E/AndroidRuntime(11988): at cn.com.vargo.ivargosetupwizard.WelcomActivity.finishSetup(WelcomActivity.java:105)
08-26 10:28:32.383: E/AndroidRuntime(11988): at cn.com.vargo.ivargosetupwizard.WelcomActivity$1.onClick(WelcomActivity.java:126)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.view.View.performClick(View.java:4438)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.view.View$PerformClick.run(View.java:18422)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.os.Handler.handleCallback(Handler.java:733)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.os.Handler.dispatchMessage(Handler.java:95)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.os.Looper.loop(Looper.java:136)
08-26 10:28:32.383: E/AndroidRuntime(11988): at android.app.ActivityThread.main(ActivityThread.java:5017)
08-26 10:28:32.383: E/AndroidRuntime(11988): at java.lang.reflect.Method.invokeNative(Native Method)
08-26 10:28:32.383: E/AndroidRuntime(11988): at java.lang.reflect.Method.invoke(Method.java:515)
08-26 10:28:32.383: E/AndroidRuntime(11988): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
08-26 10:28:32.383: E/AndroidRuntime(11988): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
08-26 10:28:32.383: E/AndroidRuntime(11988): at dalvik.system.NativeStart.main(Native Method)
问题不是再配置清单 中没有添加这个活动,而是这个活动把自己给禁止调用了:
// Intent intentintent
private void disableSetupWizards(Intent intent) {
final PackageManager pm = getPackageManager();
pm.setComponentEnabledSetting(getComponentName(),
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
}