0

我有以下问题:

当我像这样在我的应用程序中启动地图活动时

public void gotoNav (View view) {
    Intent nav = new Intent(Intent.ACTION_VIEW, Uri.parse("http://maps.google.com/maps?daddr=47.******,8.*****"));
    startActivity(nav);
}

Google 地图启动,但出现在recent apps- 对话框中。通常不应该。当通过后退按钮离开地图时(顺便说一句,您可以在描述此按钮的字符串中使用字符吗?),会出现“app-crashed-force-close”消息。当我以同样的方式启动我的邮件应用程序时(URI 字符串除外mailto:user@example.com),它既不会出现在最近的应用程序中,也不会出现这样的消息。

有什么问题?

编辑:错误日志...

02-13 23:15:37.250: D/AndroidRuntime(6947): Shutting down VM
02-13 23:15:37.250: W/dalvikvm(6947): threadid=1: thread exiting with uncaught exception (group=0x40018578)
02-13 23:15:37.281: E/AndroidRuntime(6947): FATAL EXCEPTION: main
02-13 23:15:37.281: E/AndroidRuntime(6947): android.view.WindowManager$BadTokenException: Unable to add window -- token android.os.BinderProxy@405bfb00 is not valid; is your activity running?
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.view.ViewRoot.setView(ViewRoot.java:532)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:200)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:114)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.view.Window$LocalWindowManager.addView(Window.java:424)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.app.Dialog.show(Dialog.java:241)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.view.android.aL.show(SourceFile:52)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.view.android.S.s(SourceFile:758)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.android.BaseMapsActivity.actuallyShow(SourceFile:102)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.android.BaseMapsActivity.showDialog(SourceFile:88)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.view.android.S.l(SourceFile:404)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.view.android.S.show(SourceFile:390)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.ca.c(SourceFile:372)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.ca.b(SourceFile:404)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.C.j(SourceFile:194)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.ca.a(SourceFile:661)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.ca.b(SourceFile:401)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.C.j(SourceFile:194)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.ca.a(SourceFile:246)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.ca.a(SourceFile:261)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.ca.a(SourceFile:205)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.jv.c(SourceFile:352)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.wizard.jv.e(SourceFile:1597)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.s.c(SourceFile:5496)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.A.f(SourceFile:448)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.A.a(SourceFile:387)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.ui.s.a(SourceFile:5336)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.android.M.a(SourceFile:2356)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.android.M.o(SourceFile:1730)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.android.M.k(SourceFile:1043)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.android.M.a(SourceFile:720)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.android.maps.MapsActivity.processIntentAndStartSession(SourceFile:1031)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.android.maps.w.a(SourceFile:836)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.google.googlenav.x.run(SourceFile:127)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.os.Handler.handleCallback(Handler.java:587)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.os.Handler.dispatchMessage(Handler.java:92)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.os.Looper.loop(Looper.java:130)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at android.app.ActivityThread.main(ActivityThread.java:3687)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at java.lang.reflect.Method.invokeNative(Native Method)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at java.lang.reflect.Method.invoke(Method.java:507)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
02-13 23:15:37.281: E/AndroidRuntime(6947):     at dalvik.system.NativeStart.main(Native Method)
02-13 23:15:37.289: E/liblog(1495): failed to call dumpstate
02-13 23:15:37.296: E/(1495): Dumpstate > /data/log/dumpstate_app_error
4

0 回答 0