I'm fully aware that this question has been asked before, in 2 instances: Display Map v2 in popup Window not display in android? Transparent Google Map on PopupWindow?
I want to add some information, but after I edited the second question, my edit disappeared from my view, so I guess someone rejected it or something.
In my case:
1. The API key is NOT wrong. The map is displayed perfectly fine on a Nexus 10, inside the popup, and in an Android 4.0.3 device, in a separate activity.
2. The SupportMapFragment is working fine if placed in a new activity, and is NOT working when placed inside a PopupWindow
. The only clue I have is the following LogCat output:
12-12 18:45:52.362: WARN/WindowManager(158): Failed looking up window
java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@4139e958 does not exist
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7168)
at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:7159)
at com.android.server.wm.WindowManagerService.performDeferredDestroyWindow(WindowManagerService.java:2839)
at com.android.server.wm.Session.performDeferredDestroy(Session.java:167)
at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:205)
at com.android.server.wm.Session.onTransact(Session.java:111)
at android.os.Binder.execTransact(Binder.java:338)
at dalvik.system.NativeStart.run(Native Method)
I read here that it's probably due to the device's API not supporting the call being made, but I don't know why. I repeat, the Map inside the PopupWindow
works fine on my Nexus 10 (running Android 4.4) but not on the tablet from work, which runs Android 4.0.3.