title: Android map popup on tap
body: <p>I have followed twice this basic tutorial to create a map + an overlay with the AndroidMarker (when you tap him, a popup should appear)
  And I still have the same problem, when I press the marker, the application crashed on the dialog.show(). </p>
  
  <p>Can you tell me how to debug such problem please ?</p>
  
  <p><a href="http://www.anddev.org/map-tutorials-f18/popup-when-i-tap-marker-t49121.html" rel="nofollow">My sources can be found here</a> (Link is dead. The requested topic does not exist.)</p>
  
  <pre><code>11-23 12:48:51.364: WARN/WindowManager(59): Attempted to add window with non-application token WindowToken{43f3eb70 token=null}.  Aborting.
  11-23 12:48:51.384: DEBUG/AndroidRuntime(307): Shutting down VM
  11-23 12:48:51.384: WARN/dalvikvm(307): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307): FATAL EXCEPTION: main
  11-23 12:48:51.454: ERROR/AndroidRuntime(307): android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.ViewRoot.setView(ViewRoot.java:509)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.app.Dialog.show(Dialog.java:241)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.markerTest.HelloItemizedOverlay.onTap(HelloItemizedOverlay.java:45)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.google.android.maps.ItemizedOverlay.onTap(ItemizedOverlay.java:453)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.google.android.maps.OverlayBundle.onTap(OverlayBundle.java:83)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.google.android.maps.MapView$1.onSingleTapUp(MapView.java:347)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.google.android.maps.GestureDetector.onTouchEvent(GestureDetector.java:533)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.google.android.maps.MapView.onTouchEvent(MapView.java:647)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.View.dispatchTouchEvent(View.java:3766)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:897)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:936)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1671)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.app.Activity.dispatchTouchEvent(Activity.java:2086)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1655)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1785)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.os.Handler.dispatchMessage(Handler.java:99)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.os.Looper.loop(Looper.java:123)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at android.app.ActivityThread.main(ActivityThread.java:4627)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at java.lang.reflect.Method.invokeNative(Native Method)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at java.lang.reflect.Method.invoke(Method.java:521)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
  11-23 12:48:51.454: ERROR/AndroidRuntime(307):     at dalvik.system.NativeStart.main(Native Method)
  11-23 12:48:51.534: WARN/ActivityManager(59):   Force finishing activity com.markerTest/.markerTest
  </code></pre>
  
  <p>thx</p>
  
  <p>Swan</p>