You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在MainActivity的137行处你使用了 getApplication().startActivity(intent);我在运行的时候报了
Theme: themes:{default=overlay:com.h2os.youlun, iconPack:com.h2os.youlun, fontPkg:com.h2os.youlun, com.android.systemui=overlay:com.h2os.youlun, com.android.systemui.navbar=overlay:com.h2os.youlun}
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:684)
at android.app.ContextImpl.startActivity(ContextImpl.java:671)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:337)
at com.looklook.xinghongfei.looklook.MainActivity$2.onNavigationItemSelected(MainActivity.java:137)
at android.support.design.widget.NavigationView$1.onMenuItemSelected(NavigationView.java:152)
at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:817)
at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156)
at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:964)
at android.support.design.internal.NavigationMenuPresenter$1.onClick(NavigationMenuPresenter.java:318)
at android.view.View.performClick(View.java:5204)
at android.view.View$PerformClick.run(View.java:21156)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5466)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
在MainActivity的137行处你使用了 getApplication().startActivity(intent);我在运行的时候报了
Theme: themes:{default=overlay:com.h2os.youlun, iconPack:com.h2os.youlun, fontPkg:com.h2os.youlun, com.android.systemui=overlay:com.h2os.youlun, com.android.systemui.navbar=overlay:com.h2os.youlun}
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:684)
at android.app.ContextImpl.startActivity(ContextImpl.java:671)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:337)
at com.looklook.xinghongfei.looklook.MainActivity$2.onNavigationItemSelected(MainActivity.java:137)
at android.support.design.widget.NavigationView$1.onMenuItemSelected(NavigationView.java:152)
at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:817)
at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156)
at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:964)
at android.support.design.internal.NavigationMenuPresenter$1.onClick(NavigationMenuPresenter.java:318)
at android.view.View.performClick(View.java:5204)
at android.view.View$PerformClick.run(View.java:21156)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5466)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
错误,改成直接startActivity(intent);后正常运行,设备试三星GT-N7100,6.0.1系统
The text was updated successfully, but these errors were encountered: