java.lang.NoSuchMethodError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • *NOTE: This is a regression. Not seen in 5.1.2.GA.* h5.Steps to reproduce: 1. Use the below code in your app.js & make sure you are setup for android maps before running this: {code} var MapModule = require('ti.map'); var win = Ti.UI.createWindow({ fullscreen : false }); var myView1 = Ti.UI.createView({ width : 100, height : 100, backgroundColor : 'red' }); var anno = MapModule.createAnnotation({ latitude : -33.87365, customView : myView1, longitude : 151.20689, title : "Drag Me", subtitle : "Sydney is quite chill", draggable : true }); var map = MapModule.createView({ userLocation : true, mapType : MapModule.NORMAL_TYPE, animate : true, annotations : [anno], region : { latitude : -33.87365, longitude : 151.20689, latitudeDelta : 0.1, longitudeDelta : 0.1 }, //Sydney // top : '30%' }); win.add(map); win.open(); {code} 2. Let the app launch on device. h5.Actual Results: 1. App crashes with logs: {code} *[ERROR] : TiApplication: (main) [582,959] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: No virtual method toImage()Lorg/appcelerator/titanium/TiBlob; in class Lorg/appcelerator/titanium/proxy/TiViewProxy; or its super classes (declaration of 'org.appcelerator.titanium.proxy.TiViewProxy' appears in /data/app/com.appcelerator.mapmod-1/base.apk); Titanium 5.2.0,2016/02/16 09:13,e72b2b5 [ERROR] : TiApplication: java.lang.NoSuchMethodError: No virtual method toImage()Lorg/appcelerator/titanium/TiBlob; in class Lorg/appcelerator/titanium/proxy/TiViewProxy; or its super classes (declaration of 'org.appcelerator.titanium.proxy.TiViewProxy' appears in /data/app/com.appcelerator.mapmod-1/base.apk) [ERROR] : TiApplication: at ti.map.AnnotationProxy.handleCustomView(AnnotationProxy.java:206) [ERROR] : TiApplication: at ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:192) [ERROR] : TiApplication: at ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:393) [ERROR] : TiApplication: at ti.map.TiUIMapView.addAnnotations(TiUIMapView.java:406) [ERROR] : TiApplication: at ti.map.TiUIMapView.processMapProperties(TiUIMapView.java:211) [ERROR] : TiApplication: at ti.map.TiUIMapView.onMapReady(TiUIMapView.java:162) [ERROR] : TiApplication: at com.google.android.gms.maps.SupportMapFragment$zza$1.zza(Unknown Source) [ERROR] : TiApplication: at com.google.android.gms.maps.internal.zzm$zza.onTransact(Unknown Source) [ERROR] : TiApplication: at android.os.Binder.transact(Binder.java:387) [ERROR] : TiApplication: at com.google.android.gms.maps.internal.be.a(SourceFile:82) [ERROR] : TiApplication: at com.google.maps.api.android.lib6.e.fb.run(Unknown Source) [ERROR] : TiApplication: at android.os.Handler.handleCallback(Handler.java:739) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:148) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5417) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) {code} h5.Expected Results: 1. App should not crash & view should be visible on the annotation.
    via by Lokesh Choudhary,
  • *NOTE: This is a regression. Not seen in 5.1.2.GA.* h5.Steps to reproduce: 1. Use the below code in your app.js & make sure you are setup for android maps before running this: {code} var MapModule = require('ti.map'); var win = Ti.UI.createWindow({ fullscreen : false }); var myView1 = Ti.UI.createView({ width : 100, height : 100, backgroundColor : 'red' }); var anno = MapModule.createAnnotation({ latitude : -33.87365, customView : myView1, longitude : 151.20689, title : "Drag Me", subtitle : "Sydney is quite chill", draggable : true }); var map = MapModule.createView({ userLocation : true, mapType : MapModule.NORMAL_TYPE, animate : true, annotations : [anno], region : { latitude : -33.87365, longitude : 151.20689, latitudeDelta : 0.1, longitudeDelta : 0.1 }, //Sydney // top : '30%' }); win.add(map); win.open(); {code} 2. Let the app launch on device. h5.Actual Results: 1. App crashes with logs: {code} *[ERROR] : TiApplication: (main) [582,959] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: No virtual method toImage()Lorg/appcelerator/titanium/TiBlob; in class Lorg/appcelerator/titanium/proxy/TiViewProxy; or its super classes (declaration of 'org.appcelerator.titanium.proxy.TiViewProxy' appears in /data/app/com.appcelerator.mapmod-1/base.apk); Titanium 5.2.0,2016/02/16 09:13,e72b2b5 [ERROR] : TiApplication: java.lang.NoSuchMethodError: No virtual method toImage()Lorg/appcelerator/titanium/TiBlob; in class Lorg/appcelerator/titanium/proxy/TiViewProxy; or its super classes (declaration of 'org.appcelerator.titanium.proxy.TiViewProxy' appears in /data/app/com.appcelerator.mapmod-1/base.apk) [ERROR] : TiApplication: at ti.map.AnnotationProxy.handleCustomView(AnnotationProxy.java:206) [ERROR] : TiApplication: at ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:192) [ERROR] : TiApplication: at ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:393) [ERROR] : TiApplication: at ti.map.TiUIMapView.addAnnotations(TiUIMapView.java:406) [ERROR] : TiApplication: at ti.map.TiUIMapView.processMapProperties(TiUIMapView.java:211) [ERROR] : TiApplication: at ti.map.TiUIMapView.onMapReady(TiUIMapView.java:162) [ERROR] : TiApplication: at com.google.android.gms.maps.SupportMapFragment$zza$1.zza(Unknown Source) [ERROR] : TiApplication: at com.google.android.gms.maps.internal.zzm$zza.onTransact(Unknown Source) [ERROR] : TiApplication: at android.os.Binder.transact(Binder.java:387) [ERROR] : TiApplication: at com.google.android.gms.maps.internal.be.a(SourceFile:82) [ERROR] : TiApplication: at com.google.maps.api.android.lib6.e.fb.run(Unknown Source) [ERROR] : TiApplication: at android.os.Handler.handleCallback(Handler.java:739) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:148) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5417) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) {code} h5.Expected Results: 1. App should not crash & view should be visible on the annotation.
    via by Lokesh Choudhary,
  • From SDK 4.1.0 this code fails: {code:java} var aMView = Ti.UI.createView({ top: 0, zIndex: 10 }); var aMImgView = Ti.UI.createImageView({ top:0, image: 'KS_nav_ui.png' }); aMView.add(aMImgView); ann = MapModule.createAnnotation({ latitude: 47.49, longitude: 19.13, title: 'Text', animate: true, customView: aMView // This is the correct view, but it doesn't affect the problem, still crashing... }); map1.addAnnotation(ann); {code} Error in log: {code:java} [INFO] : dalvikvm: Could not find method org.appcelerator.titanium.proxy.TiViewProxy.toImage, referenced from method ti.map.AnnotationProxy.handleCustomView [WARN] : dalvikvm: VFY: unable to resolve virtual method 42619: Lorg/appcelerator/titanium/proxy/TiViewProxy;.toImage ()Lorg/appcelerator/kroll/KrollDict; [INFO] : I/dalvikvm-heap: Grow heap (frag case) to 16.157MB for 1048592-byte allocation [ERROR] : dalvikvm: adjustAdaptiveCoef max=4194304, min=1048576, ut=568 [WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41d84930) [ERROR] : TiApplication: (main) [69192,69192] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: org.appcelerator.titanium.proxy.TiViewProxy.toImage; Titanium 4.1.0,2015/07/06 11:15,d57aa7d [ERROR] : TiApplication: java.lang.NoSuchMethodError: org.appcelerator.titanium.proxy.TiViewProxy.toImage [ERROR] : TiApplication: at ti.map.AnnotationProxy.handleCustomView(AnnotationProxy.java:206) [ERROR] : TiApplication: at ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:192) [ERROR] : TiApplication: at ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:404) [ERROR] : TiApplication: at ti.map.ViewProxy.handleAddAnnotation(ViewProxy.java:280) [ERROR] : TiApplication: at ti.map.ViewProxy.handleMessage(ViewProxy.java:96) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:176) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5317) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method) {code}
    via by Zoltan Lengyel,
  • From SDK 4.1.0 this code fails: {code:java} var aMView = Ti.UI.createView({ top: 0, zIndex: 10 }); var aMImgView = Ti.UI.createImageView({ top:0, image: 'KS_nav_ui.png' }); aMView.add(aMImgView); ann = MapModule.createAnnotation({ latitude: 47.49, longitude: 19.13, title: 'Text', animate: true, customView: aMView // This is the correct view, but it doesn't affect the problem, still crashing... }); map1.addAnnotation(ann); {code} Error in log: {code:java} [INFO] : dalvikvm: Could not find method org.appcelerator.titanium.proxy.TiViewProxy.toImage, referenced from method ti.map.AnnotationProxy.handleCustomView [WARN] : dalvikvm: VFY: unable to resolve virtual method 42619: Lorg/appcelerator/titanium/proxy/TiViewProxy;.toImage ()Lorg/appcelerator/kroll/KrollDict; [INFO] : I/dalvikvm-heap: Grow heap (frag case) to 16.157MB for 1048592-byte allocation [ERROR] : dalvikvm: adjustAdaptiveCoef max=4194304, min=1048576, ut=568 [WARN] : dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41d84930) [ERROR] : TiApplication: (main) [69192,69192] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: org.appcelerator.titanium.proxy.TiViewProxy.toImage; Titanium 4.1.0,2015/07/06 11:15,d57aa7d [ERROR] : TiApplication: java.lang.NoSuchMethodError: org.appcelerator.titanium.proxy.TiViewProxy.toImage [ERROR] : TiApplication: at ti.map.AnnotationProxy.handleCustomView(AnnotationProxy.java:206) [ERROR] : TiApplication: at ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:192) [ERROR] : TiApplication: at ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:404) [ERROR] : TiApplication: at ti.map.ViewProxy.handleAddAnnotation(ViewProxy.java:280) [ERROR] : TiApplication: at ti.map.ViewProxy.handleMessage(ViewProxy.java:96) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:176) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5317) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:511) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method) {code}
    via by Zoltan Lengyel,
    • java.lang.NoSuchMethodError: No virtual method toImage()Lorg/appcelerator/titanium/TiBlob; in class Lorg/appcelerator/titanium/proxy/TiViewProxy; or its super classes (declaration of 'org.appcelerator.titanium.proxy.TiViewProxy' appears in /data/app/com.appcelerator.mapmod-1/base.apk) at ti.map.AnnotationProxy.handleCustomView(AnnotationProxy.java:206) at ti.map.AnnotationProxy.processOptions(AnnotationProxy.java:192) at ti.map.TiUIMapView.addAnnotation(TiUIMapView.java:393) at ti.map.TiUIMapView.addAnnotations(TiUIMapView.java:406) at ti.map.TiUIMapView.processMapProperties(TiUIMapView.java:211) at ti.map.TiUIMapView.onMapReady(TiUIMapView.java:162) at com.google.android.gms.maps.SupportMapFragment$zza$1.zza(Unknown Source) at com.google.android.gms.maps.internal.zzm$zza.onTransact(Unknown Source) at android.os.Binder.transact(Binder.java:387) at com.google.android.gms.maps.internal.be.a(SourceFile:82) at com.google.maps.api.android.lib6.e.fb.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    No Bugmate found.