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.

  • App crashes when we're loading images only on Honeycomb. Works on Android 2.3.3 and 4.0. Checked the android docs with Matt and found getByteCount was introduced in api level 12. This link seems to indicated that we're checking on >= when it should be > since the API_LEVEL_HONEYCOMB is defined as 11. https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/util/TiImageLruCache.java Stack Trace: tStatusBar( 188): lights on I/ActivityManager( 131): Starting: Intent { cmp=com.playdom.mobile.gardensoftime/org.appcelerator.titanium.TiActivity (has extras) } from pid 556 W/InputManagerService( 131): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@40ac4738 (uid=10024 pid=257) I/WindowManager( 131): Setting rotation to 2, animFlags=0 D/Tablet/NotificationPanel( 188): notificationCount=1 D/Vold ( 81): USB connected E/AndroidRuntime( 556): FATAL EXCEPTION: main E/AndroidRuntime( 556): java.lang.NoSuchMethodError: android.graphics.Bitmap.getByteCount E/AndroidRuntime( 556): at org.appcelerator.titanium.util.TiImageLruCache.sizeOf(TiImageLruCache.java:45) E/AndroidRuntime( 556): at org.appcelerator.titanium.util.TiImageLruCache.sizeOf(TiImageLruCache.java:14) E/AndroidRuntime( 556): at android.support.v4.util.LruCache.safeSizeOf(LruCache.java:230) E/AndroidRuntime( 556): at android.support.v4.util.LruCache.put(LruCache.java:123) E/AndroidRuntime( 556): at ti.modules.titanium.ui.widget.TiUIImageView$2.loadImageFinished(TiUIImageView.java:134) E/AndroidRuntime( 556): at org.appcelerator.titanium.util.TiLoadImageManager.handleLoadImageMessage(TiLoadImageManager.java:90) E/AndroidRuntime( 556): at org.appcelerator.titanium.util.TiLoadImageManager.handleMessage(TiLoadImageManager.java:107) E/AndroidRuntime( 556): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 556): at android.os.Looper.loop(Looper.java:126) E/AndroidRuntime( 556): at android.app.ActivityThread.main(ActivityThread.java:3997) E/AndroidRuntime( 556): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 556): at java.lang.reflect.Method.invoke(Method.java:491) E/AndroidRuntime( 556): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841) E/AndroidRuntime( 556): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) E/AndroidRuntime( 556): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 131): Force finishing activity com.playdom.mobile.gardensoftime/org.appcelerator.titanium.TiActivity W/ActivityManager( 131): Activity pause timeout for ActivityRecord{40da9fb8 com.playdom.mobile.gardensoftime/org.appcelerator.titanium.TiActivity} D/Vold ( 81): USB disconnected D/Tablet/NotificationPanel( 188): notificationCount=0 D/Tablet/NotificationPanel( 188): notificationCount=1 D/Vold ( 81): USB connected W/ActivityManager( 131): Launch timeout has expired, giving up wake lock! W/ActivityManager( 131): Activity idle timeout for ActivityRecord{40ce8360 com.playdom.mobile.gardensoftime/.GardensActivity} W/ActivityManager( 131): Activity destroy timeout for ActivityRecord{40da9fb8 com.playdom.mobile.gardensoftime/org.appcelerator.titanium.TiActivity} I/WindowManager( 131): WIN DEATH: Window{40daab20 com.playdom.mobile.gardensoftime/com.playdom.mobile.gardensoftime.GardensActivity paused=false} I/ActivityManager( 131): Process com.playdom.mobile.gardensoftime (pid 556) has died.
    via by Brian Lonsdorf,
  • App crashes when we're loading images only on Honeycomb. Works on Android 2.3.3 and 4.0. Checked the android docs with Matt and found getByteCount was introduced in api level 12. This link seems to indicated that we're checking on >= when it should be > since the API_LEVEL_HONEYCOMB is defined as 11. https://github.com/appcelerator/titanium_mobile/blob/master/android/titanium/src/java/org/appcelerator/titanium/util/TiImageLruCache.java Stack Trace: tStatusBar( 188): lights on I/ActivityManager( 131): Starting: Intent { cmp=com.playdom.mobile.gardensoftime/org.appcelerator.titanium.TiActivity (has extras) } from pid 556 W/InputManagerService( 131): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@40ac4738 (uid=10024 pid=257) I/WindowManager( 131): Setting rotation to 2, animFlags=0 D/Tablet/NotificationPanel( 188): notificationCount=1 D/Vold ( 81): USB connected E/AndroidRuntime( 556): FATAL EXCEPTION: main E/AndroidRuntime( 556): java.lang.NoSuchMethodError: android.graphics.Bitmap.getByteCount E/AndroidRuntime( 556): at org.appcelerator.titanium.util.TiImageLruCache.sizeOf(TiImageLruCache.java:45) E/AndroidRuntime( 556): at org.appcelerator.titanium.util.TiImageLruCache.sizeOf(TiImageLruCache.java:14) E/AndroidRuntime( 556): at android.support.v4.util.LruCache.safeSizeOf(LruCache.java:230) E/AndroidRuntime( 556): at android.support.v4.util.LruCache.put(LruCache.java:123) E/AndroidRuntime( 556): at ti.modules.titanium.ui.widget.TiUIImageView$2.loadImageFinished(TiUIImageView.java:134) E/AndroidRuntime( 556): at org.appcelerator.titanium.util.TiLoadImageManager.handleLoadImageMessage(TiLoadImageManager.java:90) E/AndroidRuntime( 556): at org.appcelerator.titanium.util.TiLoadImageManager.handleMessage(TiLoadImageManager.java:107) E/AndroidRuntime( 556): at android.os.Handler.dispatchMessage(Handler.java:95) E/AndroidRuntime( 556): at android.os.Looper.loop(Looper.java:126) E/AndroidRuntime( 556): at android.app.ActivityThread.main(ActivityThread.java:3997) E/AndroidRuntime( 556): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime( 556): at java.lang.reflect.Method.invoke(Method.java:491) E/AndroidRuntime( 556): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841) E/AndroidRuntime( 556): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) E/AndroidRuntime( 556): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 131): Force finishing activity com.playdom.mobile.gardensoftime/org.appcelerator.titanium.TiActivity W/ActivityManager( 131): Activity pause timeout for ActivityRecord{40da9fb8 com.playdom.mobile.gardensoftime/org.appcelerator.titanium.TiActivity} D/Vold ( 81): USB disconnected D/Tablet/NotificationPanel( 188): notificationCount=0 D/Tablet/NotificationPanel( 188): notificationCount=1 D/Vold ( 81): USB connected W/ActivityManager( 131): Launch timeout has expired, giving up wake lock! W/ActivityManager( 131): Activity idle timeout for ActivityRecord{40ce8360 com.playdom.mobile.gardensoftime/.GardensActivity} W/ActivityManager( 131): Activity destroy timeout for ActivityRecord{40da9fb8 com.playdom.mobile.gardensoftime/org.appcelerator.titanium.TiActivity} I/WindowManager( 131): WIN DEATH: Window{40daab20 com.playdom.mobile.gardensoftime/com.playdom.mobile.gardensoftime.GardensActivity paused=false} I/ActivityManager( 131): Process com.playdom.mobile.gardensoftime (pid 556) has died.
    via by Brian Lonsdorf,
    • java.lang.NoSuchMethodError: android.graphics.Bitmap.getByteCount at org.appcelerator.titanium.util.TiImageLruCache.sizeOf(TiImageLruCache.java:45) at org.appcelerator.titanium.util.TiImageLruCache.sizeOf(TiImageLruCache.java:14) at android.support.v4.util.LruCache.safeSizeOf(LruCache.java:230) at android.support.v4.util.LruCache.put(LruCache.java:123) at ti.modules.titanium.ui.widget.TiUIImageView$2.loadImageFinished(TiUIImageView.java:134) at org.appcelerator.titanium.util.TiLoadImageManager.handleLoadImageMessage(TiLoadImageManager.java:90) at org.appcelerator.titanium.util.TiLoadImageManager.handleMessage(TiLoadImageManager.java:107) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:126) at android.app.ActivityThread.main(ActivityThread.java:3997) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:491) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599) at dalvik.system.NativeStart.main(Native Method)
    No Bugmate found.