java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams

Appcelerator JIRA | Eric Merriman | 3 years ago
  1. 0

    h5. This is not a regression - occurs in 3.1.2.GA h5. Description: I was looking through the Q&A and found this report: http://developer.appcelerator.com/question/157464/not-animation-working-in-android-os-iphone-working I verified as stated that when including the borderRadius on the view, the application stops responding. This is output in the console: {code} [WARN][dalvikvm( 1143)] threadid=1: thread exiting with uncaught exception (group=0x40a71930) [ERROR][TiApplication( 1143)] (main) [3427,3427] Sending event: exception on thread: main msg:java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams; Titanium 3.1.3,2013/09/18 12:01,222f4d1 [ERROR][TiApplication( 1143)] java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams [ERROR][TiApplication( 1143)] at org.appcelerator.titanium.util.TiAnimationBuilder$AnimationListener.onAnimationEnd(TiAnimationBuilder.java:622) [ERROR][TiApplication( 1143)] at android.view.animation.Animation.fireAnimationEnd(Animation.java:920) [ERROR][TiApplication( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:878) [ERROR][TiApplication( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:940) [ERROR][TiApplication( 1143)] at android.view.animation.AnimationSet.getTransformation(AnimationSet.java:384) [ERROR][TiApplication( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:940) [ERROR][TiApplication( 1143)] at android.view.View.drawAnimation(View.java:13205) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13344) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13715) [ERROR][TiApplication( 1143)] at android.widget.FrameLayout.draw(FrameLayout.java:467) [ERROR][TiApplication( 1143)] at android.view.View.buildDrawingCache(View.java:12966) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13400) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13715) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13596) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13594) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13594) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13594) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13715) [ERROR][TiApplication( 1143)] at android.widget.FrameLayout.draw(FrameLayout.java:467) [ERROR][TiApplication( 1143)] at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2211) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2281) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.draw(ViewRootImpl.java:2177) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2045) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351) [ERROR][TiApplication( 1143)] at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) [ERROR][TiApplication( 1143)] at android.view.Choreographer.doCallbacks(Choreographer.java:562) [ERROR][TiApplication( 1143)] at android.view.Choreographer.doFrame(Choreographer.java:532) [ERROR][TiApplication( 1143)] at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) [ERROR][TiApplication( 1143)] at android.os.Handler.handleCallback(Handler.java:725) [ERROR][TiApplication( 1143)] at android.os.Handler.dispatchMessage(Handler.java:92) [ERROR][TiApplication( 1143)] at android.os.Looper.loop(Looper.java:137) [ERROR][TiApplication( 1143)] at android.app.ActivityThread.main(ActivityThread.java:5041) [ERROR][TiApplication( 1143)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][TiApplication( 1143)] at java.lang.reflect.Method.invoke(Method.java:511) [ERROR][TiApplication( 1143)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) [ERROR][TiApplication( 1143)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) [ERROR][TiApplication( 1143)] at dalvik.system.NativeStart.main(Native Method) [ERROR][AndroidRuntime( 1143)] FATAL EXCEPTION: main [ERROR][AndroidRuntime( 1143)] java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams [ERROR][AndroidRuntime( 1143)] at org.appcelerator.titanium.util.TiAnimationBuilder$AnimationListener.onAnimationEnd(TiAnimationBuilder.java:622) [ERROR][AndroidRuntime( 1143)] at android.view.animation.Animation.fireAnimationEnd(Animation.java:920) [ERROR][AndroidRuntime( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:878) [ERROR][AndroidRuntime( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:940) [ERROR][AndroidRuntime( 1143)] at android.view.animation.AnimationSet.getTransformation(AnimationSet.java:384) [ERROR][AndroidRuntime( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:940) [ERROR][AndroidRuntime( 1143)] at android.view.View.drawAnimation(View.java:13205) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13344) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13715) [ERROR][AndroidRuntime( 1143)] at android.widget.FrameLayout.draw(FrameLayout.java:467) [ERROR][AndroidRuntime( 1143)] at android.view.View.buildDrawingCache(View.java:12966) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13400) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13715) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13596) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13594) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13594) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13594) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13715) [ERROR][AndroidRuntime( 1143)] at android.widget.FrameLayout.draw(FrameLayout.java:467) [ERROR][AndroidRuntime( 1143)] at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2211) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2281) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.draw(ViewRootImpl.java:2177) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2045) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351) [ERROR][AndroidRuntime( 1143)] at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) [ERROR][AndroidRuntime( 1143)] at android.view.Choreographer.doCallbacks(Choreographer.java:562) [ERROR][AndroidRuntime( 1143)] at android.view.Choreographer.doFrame(Choreographer.java:532) [ERROR][AndroidRuntime( 1143)] at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) [ERROR][AndroidRuntime( 1143)] at android.os.Handler.handleCallback(Handler.java:725) [ERROR][AndroidRuntime( 1143)] at android.os.Handler.dispatchMessage(Handler.java:92) [ERROR][AndroidRuntime( 1143)] at android.os.Looper.loop(Looper.java:137) [ERROR][AndroidRuntime( 1143)] at android.app.ActivityThread.main(ActivityThread.java:5041) [ERROR][AndroidRuntime( 1143)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][AndroidRuntime( 1143)] at java.lang.reflect.Method.invoke(Method.java:511) [ERROR][AndroidRuntime( 1143)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) [ERROR][AndroidRuntime( 1143)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) [ERROR][AndroidRuntime( 1143)] at dalvik.system.NativeStart.main(Native Method) [WARN][ActivityManager( 350)] Force finishing activity com.appc.fromtheQA/org.appcelerator.titanium.TiActivity {code} h5. Sample code {code} var win = Ti.UI.createWindow({ backgroundColor : '#4b4276', navBarHidden : true, }); var animateLeft = Ti.UI.createAnimation({ top : 200, duration : 400, }); var loginView = Ti.UI.createView({ height : 50, width : 200, top : 0, // comment out the line below or this will fail on Android borderRadius : 10 }); var txtUserName = Ti.UI.createTextField({ backgroundColor : '#fff', hintText : 'Password', width : 150, height : 50, left : 0, font : { fontFamily : 'OpenSans-Light', }, textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER, }); loginView.add(txtUserName); var btnUserLogin = Ti.UI.createButton({ backgroundImage : 'none', backgroundColor : '#92cf5c', font : { fontFamily : 'OpenSans-Light', }, color : '#ffffff', title : 'OK', width : 50, height : 50, right : 0, }); loginView.add(btnUserLogin); win.addEventListener('open', function() { if (Ti.Platform.osname == 'android') { setTimeout(function() { loginView.animate(animateLeft); }, 1000); } else if (Ti.Platform.osname == 'iphone') { loginView.animate(animateLeft); } }); win.add(loginView); win.open(); {code} h5. Steps to reproduce: 1) Create a project with the sample code above 2) Run on Android emulator h5. Result: The app will crash with the output in the console as shown above. If you comment-out the borderRadius, the code will run as expected. h5. Expected Result: The view animates as expected.

    Appcelerator JIRA | 3 years ago | Eric Merriman
    java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams
  2. 0

    h5. This is not a regression - occurs in 3.1.2.GA h5. Description: I was looking through the Q&A and found this report: http://developer.appcelerator.com/question/157464/not-animation-working-in-android-os-iphone-working I verified as stated that when including the borderRadius on the view, the application stops responding. This is output in the console: {code} [WARN][dalvikvm( 1143)] threadid=1: thread exiting with uncaught exception (group=0x40a71930) [ERROR][TiApplication( 1143)] (main) [3427,3427] Sending event: exception on thread: main msg:java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams; Titanium 3.1.3,2013/09/18 12:01,222f4d1 [ERROR][TiApplication( 1143)] java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams [ERROR][TiApplication( 1143)] at org.appcelerator.titanium.util.TiAnimationBuilder$AnimationListener.onAnimationEnd(TiAnimationBuilder.java:622) [ERROR][TiApplication( 1143)] at android.view.animation.Animation.fireAnimationEnd(Animation.java:920) [ERROR][TiApplication( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:878) [ERROR][TiApplication( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:940) [ERROR][TiApplication( 1143)] at android.view.animation.AnimationSet.getTransformation(AnimationSet.java:384) [ERROR][TiApplication( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:940) [ERROR][TiApplication( 1143)] at android.view.View.drawAnimation(View.java:13205) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13344) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13715) [ERROR][TiApplication( 1143)] at android.widget.FrameLayout.draw(FrameLayout.java:467) [ERROR][TiApplication( 1143)] at android.view.View.buildDrawingCache(View.java:12966) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13400) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13715) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13596) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13594) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13594) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13594) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][TiApplication( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][TiApplication( 1143)] at android.view.View.draw(View.java:13715) [ERROR][TiApplication( 1143)] at android.widget.FrameLayout.draw(FrameLayout.java:467) [ERROR][TiApplication( 1143)] at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2211) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2281) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.draw(ViewRootImpl.java:2177) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2045) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989) [ERROR][TiApplication( 1143)] at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351) [ERROR][TiApplication( 1143)] at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) [ERROR][TiApplication( 1143)] at android.view.Choreographer.doCallbacks(Choreographer.java:562) [ERROR][TiApplication( 1143)] at android.view.Choreographer.doFrame(Choreographer.java:532) [ERROR][TiApplication( 1143)] at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) [ERROR][TiApplication( 1143)] at android.os.Handler.handleCallback(Handler.java:725) [ERROR][TiApplication( 1143)] at android.os.Handler.dispatchMessage(Handler.java:92) [ERROR][TiApplication( 1143)] at android.os.Looper.loop(Looper.java:137) [ERROR][TiApplication( 1143)] at android.app.ActivityThread.main(ActivityThread.java:5041) [ERROR][TiApplication( 1143)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][TiApplication( 1143)] at java.lang.reflect.Method.invoke(Method.java:511) [ERROR][TiApplication( 1143)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) [ERROR][TiApplication( 1143)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) [ERROR][TiApplication( 1143)] at dalvik.system.NativeStart.main(Native Method) [ERROR][AndroidRuntime( 1143)] FATAL EXCEPTION: main [ERROR][AndroidRuntime( 1143)] java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams [ERROR][AndroidRuntime( 1143)] at org.appcelerator.titanium.util.TiAnimationBuilder$AnimationListener.onAnimationEnd(TiAnimationBuilder.java:622) [ERROR][AndroidRuntime( 1143)] at android.view.animation.Animation.fireAnimationEnd(Animation.java:920) [ERROR][AndroidRuntime( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:878) [ERROR][AndroidRuntime( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:940) [ERROR][AndroidRuntime( 1143)] at android.view.animation.AnimationSet.getTransformation(AnimationSet.java:384) [ERROR][AndroidRuntime( 1143)] at android.view.animation.Animation.getTransformation(Animation.java:940) [ERROR][AndroidRuntime( 1143)] at android.view.View.drawAnimation(View.java:13205) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13344) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13715) [ERROR][AndroidRuntime( 1143)] at android.widget.FrameLayout.draw(FrameLayout.java:467) [ERROR][AndroidRuntime( 1143)] at android.view.View.buildDrawingCache(View.java:12966) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13400) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13715) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13596) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13594) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13594) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13594) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.drawChild(ViewGroup.java:2928) [ERROR][AndroidRuntime( 1143)] at android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797) [ERROR][AndroidRuntime( 1143)] at android.view.View.draw(View.java:13715) [ERROR][AndroidRuntime( 1143)] at android.widget.FrameLayout.draw(FrameLayout.java:467) [ERROR][AndroidRuntime( 1143)] at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2211) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2281) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.draw(ViewRootImpl.java:2177) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2045) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989) [ERROR][AndroidRuntime( 1143)] at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351) [ERROR][AndroidRuntime( 1143)] at android.view.Choreographer$CallbackRecord.run(Choreographer.java:749) [ERROR][AndroidRuntime( 1143)] at android.view.Choreographer.doCallbacks(Choreographer.java:562) [ERROR][AndroidRuntime( 1143)] at android.view.Choreographer.doFrame(Choreographer.java:532) [ERROR][AndroidRuntime( 1143)] at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735) [ERROR][AndroidRuntime( 1143)] at android.os.Handler.handleCallback(Handler.java:725) [ERROR][AndroidRuntime( 1143)] at android.os.Handler.dispatchMessage(Handler.java:92) [ERROR][AndroidRuntime( 1143)] at android.os.Looper.loop(Looper.java:137) [ERROR][AndroidRuntime( 1143)] at android.app.ActivityThread.main(ActivityThread.java:5041) [ERROR][AndroidRuntime( 1143)] at java.lang.reflect.Method.invokeNative(Native Method) [ERROR][AndroidRuntime( 1143)] at java.lang.reflect.Method.invoke(Method.java:511) [ERROR][AndroidRuntime( 1143)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) [ERROR][AndroidRuntime( 1143)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) [ERROR][AndroidRuntime( 1143)] at dalvik.system.NativeStart.main(Native Method) [WARN][ActivityManager( 350)] Force finishing activity com.appc.fromtheQA/org.appcelerator.titanium.TiActivity {code} h5. Sample code {code} var win = Ti.UI.createWindow({ backgroundColor : '#4b4276', navBarHidden : true, }); var animateLeft = Ti.UI.createAnimation({ top : 200, duration : 400, }); var loginView = Ti.UI.createView({ height : 50, width : 200, top : 0, // comment out the line below or this will fail on Android borderRadius : 10 }); var txtUserName = Ti.UI.createTextField({ backgroundColor : '#fff', hintText : 'Password', width : 150, height : 50, left : 0, font : { fontFamily : 'OpenSans-Light', }, textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER, }); loginView.add(txtUserName); var btnUserLogin = Ti.UI.createButton({ backgroundImage : 'none', backgroundColor : '#92cf5c', font : { fontFamily : 'OpenSans-Light', }, color : '#ffffff', title : 'OK', width : 50, height : 50, right : 0, }); loginView.add(btnUserLogin); win.addEventListener('open', function() { if (Ti.Platform.osname == 'android') { setTimeout(function() { loginView.animate(animateLeft); }, 1000); } else if (Ti.Platform.osname == 'iphone') { loginView.animate(animateLeft); } }); win.add(loginView); win.open(); {code} h5. Steps to reproduce: 1) Create a project with the sample code above 2) Run on Android emulator h5. Result: The app will crash with the output in the console as shown above. If you comment-out the borderRadius, the code will run as expected. h5. Expected Result: The view animates as expected.

    Appcelerator JIRA | 3 years ago | Eric Merriman
    java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams
  3. 0

    ClassCastException with StickyHeader: FrameLayout$LayoutParams cannot be cast to RecyclerView$LayoutParams

    GitHub | 2 months ago | jonathanyee
    java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.support.v7.widget.RecyclerView$LayoutParams
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Using ScrollView in Navigation Drawer

    Stack Overflow | 3 years ago | Abdullah Fahim
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.migrationdesk.mylibman/com.migrationdesk.mylibman.NavContainer}: java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to android.support.v4.widget.DrawerLayout$LayoutParams
  6. 0

    [Crash Log] Wed, 25 Feb 2015 08:34:04 GMT

    GitHub | 2 years ago | blFeedbackBot
    java.lang.ClassCastException: android.widget.FrameLayout$LayoutParams cannot be cast to com.android.internal.widget.ActionBarOverlayLayout$LayoutParams

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.widget.FrameLayout$LayoutParams cannot be cast to org.appcelerator.titanium.view.TiCompositeLayout$LayoutParams

      at org.appcelerator.titanium.util.TiAnimationBuilder$AnimationListener.onAnimationEnd()
    2. org.appcelerator.titanium
      TiAnimationBuilder$AnimationListener.onAnimationEnd
      1. org.appcelerator.titanium.util.TiAnimationBuilder$AnimationListener.onAnimationEnd(TiAnimationBuilder.java:622)
      1 frame
    3. Android Platform
      ViewGroup.dispatchDraw
      1. android.view.animation.Animation.fireAnimationEnd(Animation.java:920)
      2. android.view.animation.Animation.getTransformation(Animation.java:878)
      3. android.view.animation.Animation.getTransformation(Animation.java:940)
      4. android.view.animation.AnimationSet.getTransformation(AnimationSet.java:384)
      5. android.view.animation.Animation.getTransformation(Animation.java:940)
      6. android.view.View.drawAnimation(View.java:13205)
      7. android.view.View.draw(View.java:13344)
      8. android.view.ViewGroup.drawChild(ViewGroup.java:2928)
      9. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797)
      10. android.view.View.draw(View.java:13715)
      11. android.widget.FrameLayout.draw(FrameLayout.java:467)
      12. android.view.View.buildDrawingCache(View.java:12966)
      13. android.view.View.draw(View.java:13400)
      14. android.view.ViewGroup.drawChild(ViewGroup.java:2928)
      15. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797)
      15 frames
    4. org.appcelerator.titanium
      TiCompositeLayout.dispatchDraw
      1. org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646)
      1 frame
    5. Android Platform
      ViewGroup.dispatchDraw
      1. android.view.View.draw(View.java:13715)
      2. android.view.View.draw(View.java:13596)
      3. android.view.ViewGroup.drawChild(ViewGroup.java:2928)
      4. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797)
      4 frames
    6. org.appcelerator.titanium
      TiCompositeLayout.dispatchDraw
      1. org.appcelerator.titanium.view.TiCompositeLayout.dispatchDraw(TiCompositeLayout.java:646)
      1 frame
    7. Android Platform
      FrameLayout.draw
      1. android.view.View.draw(View.java:13594)
      2. android.view.ViewGroup.drawChild(ViewGroup.java:2928)
      3. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797)
      4. android.view.View.draw(View.java:13594)
      5. android.view.ViewGroup.drawChild(ViewGroup.java:2928)
      6. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797)
      7. android.view.View.draw(View.java:13594)
      8. android.view.ViewGroup.drawChild(ViewGroup.java:2928)
      9. android.view.ViewGroup.dispatchDraw(ViewGroup.java:2797)
      10. android.view.View.draw(View.java:13715)
      11. android.widget.FrameLayout.draw(FrameLayout.java:467)
      11 frames
    8. Android
      PhoneWindow$DecorView.draw
      1. com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2211)
      1 frame
    9. Android Platform
      ActivityThread.main
      1. android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:2281)
      2. android.view.ViewRootImpl.draw(ViewRootImpl.java:2177)
      3. android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2045)
      4. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1854)
      5. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:989)
      6. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:4351)
      7. android.view.Choreographer$CallbackRecord.run(Choreographer.java:749)
      8. android.view.Choreographer.doCallbacks(Choreographer.java:562)
      9. android.view.Choreographer.doFrame(Choreographer.java:532)
      10. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:735)
      11. android.os.Handler.handleCallback(Handler.java:725)
      12. android.os.Handler.dispatchMessage(Handler.java:92)
      13. android.os.Looper.loop(Looper.java:137)
      14. android.app.ActivityThread.main(ActivityThread.java:5041)
      14 frames
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:511)
      2 frames
    11. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
      2 frames
    12. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame