Appplication forclosing
Hi Martin, i'm having a problem when initializing the MapView, it seemed to have been working fine at work when i was running it, i came home and now the application forcloses at that point, below i'm pasting the log i see when it crashes maybe you can help me figure out why it's doing this.
this is my code in the Sub Activity_Create
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("MapView")
If File.ExternalWritable=False Then
Log("WARNING NO EXTERNAL STORAGE AVAILABLE")
End If
'lstSchedule.Initialize("lstschedule")
locationlist.Initialize
location5.Initialize
VehicleIDs.Initialize
wbMapView.Initialize("wbMapView") 'appliation forcloses at this point!!!!!!!
Activity.AddView(wbMapView, 0, 0, 100%x, 100%y)
wbMapView.SetZoomEnabled(True)
wbMapView.SetMultiTouchEnabled(True)
wbMapView.Zoom = 18
MyLocationOverlay1.Initialize(wbMapView, "mylocationoverlay1")
MarkersOverlay1.Initialize(wbMapView, "MarkersOverlay1")
wbMapView.AddOverlay(MyLocationOverlay1)
wbMapView.AddOverlay(MarkersOverlay1)
MyLocationOverlay1.CompassEnabled = True
icon.Initialize(LoadBitmap(File.DirAssets, "lametrobus.jpg"))
Markers.Initialize2(Array As Marker(Marker1))
'wbMapView.Width = 100%x
'wbMapView.Height = 100%y
'wbMapView.Initialize("wbMapView")
Parser4.Initialize
stoptags5.Initialize
refreshinterval.Initialize("refreshinterval", 30000)
'GPS2.Initialize("GPS2")
'GPS2.Start(5000, 10)
'wbMapView.LoadUrl("file:///android_asset/location_map.htm?lat="&stooptags.latitude1&"&lng="&stooptags.longitude1&"&zoom=8")
hc4.Initialize("hc4")
url = "http://webservices.nextbus.com/service/publicXMLFeed?command=vehicleLocations&a=lametro&r=" & Main.busnumber & "&t=0"
req4.InitializeGet(url)
hc4.Execute(req4, 3)
ProgressDialogShow("Preparing Map.....")
End Sub
and here is the log when it crashes
Could not find method org.slf4j.LoggerFactory.getLogger, referenced from method org.osmdroid.DefaultResourceProxyImpl.<clinit>
VFY: unable to resolve static method 4285: Lorg/slf4j/LoggerFactory;.getLogger (Ljava/lang/Class
Lorg/slf4j/Logger;
VFY: replacing opcode 0x71 at 0x0002
VFY: dead code 0x0005-0008 in Lorg/osmdroid/DefaultResourceProxyImpl;.<clinit> ()V
Could not find method org.slf4j.Logger.error, referenced from method org.osmdroid.DefaultResourceProxyImpl.getBitmap
VFY: unable to resolve interface method 4277: Lorg/slf4j/Logger;.error (Ljava/lang/String
V
VFY: replacing opcode 0x72 at 0x004a
VFY: dead code 0x004d-0050 in Lorg/osmdroid/DefaultResourceProxyImpl;.getBitmap (Lorg/osmdroid/ResourceProxy$bitmap
Landroid/graphics/Bitmap;
Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lorg/osmdroid/DefaultResourceProxyImpl;
Shutting down VM
threadid=1: thread exiting with uncaught exception (group=0x4001a560)
wake lock acquired
decideWhoNeedsPolling(): polling PushService
Finished sending keep alive
modifyApp(): PushService
calculateShortestInterval(): shortest interval is 75121
org.apache.harmony.nio.internal.SocketChannelImpl@40a7b860: Wrote out 22 bytes of data with 0 bytes remaining.
wake lock released
waiting to render 0x17960
Sending signal. PID: 2332 SIG: 9
channel '40e38ce0 dandre.dev.com/dandre.dev.com.main (server)' ~ Consumer closed input channel or an error occurred. events=0x8
channel '40e38ce0 dandre.dev.com/dandre.dev.com.main (server)' ~ Channel is unrecoverably broken and will be disposed!
Previously focused view reported id 1 during save, but can't be found during restore.
** Activity (direction) Create, isFirst = true **
GC_EXTERNAL_ALLOC freed 223K, 48% free 2873K/5511K, external 2741K/2773K, paused 26ms
direction_activity_create (B4A line: 52)
Parser1.Initialize
java.lang.NullPointerException
at dandre.dev.com.direction._activity_create(direction.java:274)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:105)
at dandre.dev.com.direction.afterFirstLayout(direction.java:84)
at dandre.dev.com.direction.access$100(direction.java:16)
at dandre.dev.com.direction$WaitForLayout.run(direction.java:72)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
java.lang.NullPointerException
hopefully you can help me figure out what's going on, i don't see why it should crash when the mapview is initialized.
thanks,
Walter