I do not know if this helps, but here is a sample MapView project that
generally works (once you put in your own API key):

http://github.com/commonsguy/cw-android/tree/master/Maps/NooYawk/

Try that and see if you get the same crash. If not, start poking
around to see what might be different between the layouts or
something.

On Wed, Aug 25, 2010 at 4:52 PM, tony obrien <[email protected]> wrote:
> I have a DROID using Android 2.2
>
> I am attempting to get the simplest MapActivity to run on the device.
> (NetBeans latest and greatest using a Google Api build target.)
>
> I have all the appropriate Manifest entries, the simplest OnCreate ---
>> all it does is setContextView() to the xml with a mapview in it.
>
> When it runs; the screen goes black for a few seconds then an error
> dialog saying it stopped.
> The problem seems to be WAY INSIDE map object.
> Any suggestions would be most welcome.
>
> The (poignant parts of the) log  -->
>
> E/AndroidRuntime(24224): FATAL EXCEPTION: main
> E/AndroidRuntime(24224): java.lang.NullPointerException
> E/AndroidRuntime(24224):        at
> com.google.android.maps.PixelConverter.toPixels(PixelConverter.java:
> 71)
> E/AndroidRuntime(24224):        at
> com.google.android.maps.PixelConverter.toPixels(PixelConverter.java:
> 61)
> E/AndroidRuntime(24224):        at
> com.google.android.maps.MapView.onLayout(MapView.java:681)
> E/AndroidRuntime(24224):        at android.view.View.layout(View.java:7035)
> E/AndroidRuntime(24224):        at
> android.widget.FrameLayout.onLayout(FrameLayout.java:333)
> E/AndroidRuntime(24224):        at android.view.View.layout(View.java:7035)
> E/AndroidRuntime(24224):        at
> android.widget.LinearLayout.setChildFrame(LinearLayout.java:1249)
> E/AndroidRuntime(24224):        at
> android.widget.LinearLayout.layoutVertical(LinearLayout.java:1125)
> E/AndroidRuntime(24224):        at
> android.widget.LinearLayout.onLayout(LinearLayout.java:1042)
> E/AndroidRuntime(24224):        at android.view.View.layout(View.java:7035)
> E/AndroidRuntime(24224):        at
> android.widget.FrameLayout.onLayout(FrameLayout.java:333)
> E/AndroidRuntime(24224):        at android.view.View.layout(View.java:7035)
> E/AndroidRuntime(24224):        at
> android.view.ViewRoot.performTraversals(ViewRoot.java:1045)
> E/AndroidRuntime(24224):        at
> android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
> E/AndroidRuntime(24224):        at
> android.os.Handler.dispatchMessage(Handler.java:99)
> E/AndroidRuntime(24224):        at android.os.Looper.loop(Looper.java:123)
> E/AndroidRuntime(24224):        at
> android.app.ActivityThread.main(ActivityThread.java:4627)
> E/AndroidRuntime(24224):        at
> java.lang.reflect.Method.invokeNative(Native Method)
> E/AndroidRuntime(24224):        at
> java.lang.reflect.Method.invoke(Method.java:521)
> E/AndroidRuntime(24224):        at com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:868)
> E/AndroidRuntime(24224):        at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
> E/AndroidRuntime(24224):        at dalvik.system.NativeStart.main(Native
> Method)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.1 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to