简体   繁体   English

Google Play崩溃报告的Android应用崩溃报告

[英]Android application crash reported by google play crash report

I got a below crash report in my android application from google play 我在Google Play的Android应用程序中收到了以下崩溃报告

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:625)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:258)
at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:229)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:336)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4633)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)

I am not sure if its my coding mistake or its a Android bug. 我不确定是我的编码错误还是Android错误。 Could you please help me in understanding this issue. 您能帮我理解这个问题吗?

Thank you. 谢谢。

There is a flag missing in your intent: 您的意图中缺少一个标志:

Intent intent = new Intent(this, SomeActivity.class);
intent.setFlags( Intent.FLAG_ACTIVITY_NEW_TASK)
startActivity(intent);

Hope this helps .... Cheers! 希望这对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM