Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Problem with map in Android

Hello. I have wrote this code to generate a map:

var win = Titanium.UI.currentWindow;
var map = Titanium.Map.createView({
    mapType: Titanium.Map.SATELLITE_TYPE,
    region: {
        latitude:37.609565,
        longitude:-0.995475,
        latitudeDelta:0.001,
        longitudeDelta:0.001
    },
    animate:true,
    regionFit:true,
    userLocation: true
});

win.add(map);

In iphone it runs great, but in android I get this trace:

[TRACE] D/KrollContext( 212): (kroll$3) [16582,19567] eval file: app://main_windows/contact.js
[TRACE] W/InputManagerService( 53): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4386abf0
[TRACE] W/dalvikvm( 212): Unable to resolve superclass of Lti/modules/titanium/map/TiMapActivity; (216)
[TRACE] W/dalvikvm( 212): Link of class 'Lti/modules/titanium/map/TiMapActivity;' failed
[TRACE] E/dalvikvm( 212): Could not find class 'ti.modules.titanium.map.TiMapActivity', referenced from method ti.modules.titanium.map.ViewProxy.createView
[TRACE] W/dalvikvm( 212): VFY: unable to resolve const-class 1608 (Lti/modules/titanium/map/TiMapActivity;) in Lti/modules/titanium/map/ViewProxy;
[TRACE] W/dalvikvm( 212): VFY: rejecting opcode 0x1c at 0x0030
[TRACE] W/dalvikvm( 212): VFY: rejected Lti/modules/titanium/map/ViewProxy;.createView (Landroid/app/Activity;)Lorg/appcelerator/titanium/view/TiUIView;
[TRACE] W/dalvikvm( 212): Verifier rejected class Lti/modules/titanium/map/ViewProxy;
[TRACE] E/TiModule( 212): (kroll$3) [172,19739] Error creating proxy ti.modules.titanium.map.ViewProxy: ti.modules.titanium.map.ViewProxy
[TRACE] E/TiModule( 212): java.lang.ClassNotFoundException: ti.modules.titanium.map.ViewProxy
[TRACE] E/TiModule( 212): at java.lang.Class.classForName(Native Method)
[TRACE] E/TiModule( 212): at java.lang.Class.forName(Class.java:237)
[TRACE] E/TiModule( 212): at java.lang.Class.forName(Class.java:183)
[TRACE] E/TiModule( 212): at org.appcelerator.titanium.TiModule.createProxy(TiModule.java:94)
[TRACE] E/TiModule( 212): at java.lang.reflect.Method.invokeNative(Native Method)
[TRACE] E/TiModule( 212): at java.lang.reflect.Method.invoke(Method.java:521)
[TRACE] E/TiModule( 212): at org.appcelerator.titanium.kroll.KrollMethod.call(KrollMethod.java:84)
[TRACE] E/TiModule( 212): at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
[TRACE] E/TiModule( 212): at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
[TRACE] E/TiModule( 212): at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
[TRACE] E/TiModule( 212): at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)
[TRACE] E/TiModule( 212): at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)
[TRACE] E/TiModule( 212): at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)
[TRACE] E/TiModule( 212): at org.mozilla.javascript.Context.evaluateReader(Unknown Source)
[TRACE] E/TiModule( 212): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:159)
[TRACE] E/TiModule( 212): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:101)
[TRACE] E/TiModule( 212): at android.os.Handler.dispatchMessage(Handler.java:95)
[TRACE] E/TiModule( 212): at android.os.Looper.loop(Looper.java:123)
[TRACE] E/TiModule( 212): at android.os.HandlerThread.run(HandlerThread.java:60)
[TRACE] E/TiModule( 212): Caused by: java.lang.VerifyError: ti.modules.titanium.map.ViewProxy
[TRACE] E/TiModule( 212): … 19 more
[TRACE] D/AndroidRuntime( 212): Shutting down VM
[TRACE] W/dalvikvm( 212): threadid=3: thread exiting with uncaught exception (group=0x4001aa28)
[TRACE] E/TiUncaughtHandler( 212): (main) [51,19790] Sending event: exception on thread: main msg:java.lang.NullPointerException
[TRACE] E/TiUncaughtHandler( 212): java.lang.NullPointerException
[TRACE] E/TiUncaughtHandler( 212): at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:284)
[TRACE] E/TiUncaughtHandler( 212): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:102)
[TRACE] E/TiUncaughtHandler( 212): at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:71)
[TRACE] E/TiUncaughtHandler( 212): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:74)
[TRACE] E/TiUncaughtHandler( 212): at android.os.Handler.dispatchMessage(Handler.java:95)
[TRACE] E/TiUncaughtHandler( 212): at android.os.Looper.loop(Looper.java:123)
[TRACE] E/TiUncaughtHandler( 212): at android.app.ActivityThread.main(ActivityThread.java:4203)
[TRACE] E/TiUncaughtHandler( 212): at java.lang.reflect.Method.invokeNative(Native Method)
[TRACE] E/TiUncaughtHandler( 212): at java.lang.reflect.Method.invoke(Method.java:521)
[TRACE] E/TiUncaughtHandler( 212): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
[TRACE] E/TiUncaughtHandler( 212): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
[TRACE] E/TiUncaughtHandler( 212): at dalvik.system.NativeStart.main(Native Method)
[TRACE] I/TiApplication( 212): (main) [79,19869] Analytics are disabled, ignoring postAnalyticsEvent
[TRACE] E/AndroidRuntime( 212): Uncaught handler: thread main exiting due to uncaught exception
[TRACE] E/AndroidRuntime( 212): java.lang.NullPointerException
[TRACE] E/AndroidRuntime( 212): at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:284)
[TRACE] E/AndroidRuntime( 212): at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:102)
[TRACE] E/AndroidRuntime( 212): at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:71)
[TRACE] E/AndroidRuntime( 212): at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:74)
[TRACE] E/AndroidRuntime( 212): at android.os.Handler.dispatchMessage(Handler.java:95)
[TRACE] E/AndroidRuntime( 212): at android.os.Looper.loop(Looper.java:123)
[TRACE] E/AndroidRuntime( 212): at android.app.ActivityThread.main(ActivityThread.java:4203)
[TRACE] E/AndroidRuntime( 212): at java.lang.reflect.Method.invokeNative(Native Method)
[TRACE] E/AndroidRuntime( 212): at java.lang.reflect.Method.invoke(Method.java:521)
[TRACE] E/AndroidRuntime( 212): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
[TRACE] E/AndroidRuntime( 212): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
[TRACE] E/AndroidRuntime( 212): at dalvik.system.NativeStart.main(Native Method)
[TRACE] I/Process ( 53): Sending signal. PID: 212 SIG: 3
[TRACE] I/dalvikvm( 212): threadid=7: reacting to signal 3
[TRACE] I/dalvikvm( 212): Wrote stack trace to '/data/anr/traces.txt'
[TRACE] I/ARMAssembler( 53): generated scanline00000077:03515104_00000000_00000000 [ 27 ipp] (41 ins) at [0x2ad400:0x2ad4a4] in 586000 ns
[TRACE] I/ARMAssembler( 53): generated scanline
00000077:03515104_00001001_00000000 [ 64 ipp] (84 ins) at [0x2ad4a8:0x2ad5f8] in 1573000 ns

what's wrong? Regards

— asked September 16th 2010 by Leandro Vidal
  • android
  • error
  • map
4 Comments
  • I am also getting this error. I think you can work around it by editing dependencies.json file.

    — commented February 2nd 2011 by Matt McElligott
  • Also getting this with sdk 1.7.0. Works fine on iPhone sim, crashes in Android. @Matt McElligott, what is the workaround in dependency.json?

    — commented June 14th 2011 by Ameesh Kapoor
  • @Ameesh Kapoor i would suggest opening a new issue with your specific stack trace… this issue is almost a year old

    — commented June 14th 2011 by Aaron Saunders
  • Done and done, thanks Aaron

    — commented June 15th 2011 by Ameesh Kapoor

1 Answer

The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.