在我的第一个活动开始崩溃之后,我试图将FacebookSDK升级到最新版本。 这就是我实例化活动并启动它的方式^
Context context = getContext();
Intent intent = new Intent(context, mAuthorizationActivityClass);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(intent);
崩溃堆栈跟踪如下:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.myapp/com.myapp.NavigationActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.myapp/com.myorg.authorization.AuthorizationActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.myapp/com.myorg.authorization.AuthorizationActivity}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1777)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1501)
at android.app.ContextImpl.startActivity(ContextImpl.java:1251)
at android.app.ContextImpl.startActivity(ContextImpl.java:1233)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:323)
at com.myorg.authorization.AuthorizationHelper.startAuthorization(AuthorizationHelper.java:100)
at com.myapp.AuthorizedActivity.onCreate(AuthorizedActivity.java:88)
at com.myapp.AuthorizedShareActivity.onCreate(AuthorizedShareActivity.java:20)
at com.myapp.NavigationActivity.onCreate(NavigationActivity.java:146)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
com.myorg.authorization.AuthorizationActivity是一个抽象类,用于实现不同类型的授权(例如本机,facebook等),当我回滚FacebookSDK时,应用程序功能正在恢复,