Fixed
Status Update
Comments
di...@google.com <di...@google.com> #2
Is this just a regular button? Any custom views? Do you have a minimal example that reproduces the problem?
Thanks!
Thanks!
[Deleted User] <[Deleted User]> #3
Yes. Its a regular button. Same issue with the MaterialButton from
com.google.android.material:material:1.1.0-alpha05.
constraint layout - androidx.constraintlayout:constraintlayout:2.0.0-alpha3
gradle plugin - com.android.tools.build:gradle:3.5.0-alpha08
Using this with Kotlin gradle DSL which also brings up other bugs while adding material components (like FABs) as the editor cannot find the dependencies in build.gradle file coz may be it pattern matches it to the groovy syntax and shows an alert everytime to add the dependency for the design library. There are a couple more, may be I'll create issues for them later when I have the time.
Noticed this in AS 3.5 canary 9 first and then tried on the canary 8. Have also tried with constraintlayout 1.1.3.
com.google.android.material:material:1.1.0-alpha05.
constraint layout - androidx.constraintlayout:constraintlayout:2.0.0-alpha3
gradle plugin - com.android.tools.build:gradle:3.5.0-alpha08
Using this with Kotlin gradle DSL which also brings up other bugs while adding material components (like FABs) as the editor cannot find the dependencies in build.gradle file coz may be it pattern matches it to the groovy syntax and shows an alert everytime to add the dependency for the design library. There are a couple more, may be I'll create issues for them later when I have the time.
Noticed this in AS 3.5 canary 9 first and then tried on the canary 8. Have also tried with constraintlayout 1.1.3.
jg...@google.com <jg...@google.com>
ko...@gmail.com <ko...@gmail.com> #4
Happens in Android Studio 3.4 (stable), too.
[Deleted User] <[Deleted User]> #5
Created a custom button class which just extends the MaterialButton. The layout editor doesn't seem to have any problems with that and works for now.
class AppMaterialButton(context: Context, attrs: AttributeSet) : MaterialButton(context, attrs)
class AppMaterialButton(context: Context, attrs: AttributeSet) : MaterialButton(context, attrs)
Description
AI-191.6014.8.35.5375575, JRE 1.8.0_152-release-1343-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.14.4, screens 1200x1920, 1920x1080
AS: 3.5 Canary 8; Android Gradle Plugin: 3.5.0-alpha08; Gradle: 5.3; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)
Constraint layout works fine with all other widgets but when a Button is added to it, it breaks the preview and also shows the button in the left top corner with zero size. Have tried Invalidate cache/ restart, clean/Rebuild etc. Been getting exceptions in the layout editor when this happens.
Here it is.
java.lang.IllegalArgumentException: java.lang.ClassCastException@53b329bb
at sun.reflect.GeneratedMethodAccessor560.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at android.animation.PropertyValuesHolder_Delegate.callMethod(PropertyValuesHolder_Delegate.java:108)
at android.animation.PropertyValuesHolder_Delegate.nCallFloatMethod(PropertyValuesHolder_Delegate.java:143)
at android.animation.PropertyValuesHolder.nCallFloatMethod(PropertyValuesHolder.java)
at android.animation.PropertyValuesHolder.access$400(PropertyValuesHolder.java:38)
at android.animation.PropertyValuesHolder$FloatPropertyValuesHolder.setAnimatedValue(PropertyValuesHolder.java:1387)
at android.animation.ObjectAnimator.animateValue(ObjectAnimator.java:990)
at android.animation.ValueAnimator.setCurrentFraction(ValueAnimator.java:674)
at android.animation.ValueAnimator.start(ValueAnimator.java:1071)
at android.animation.ValueAnimator.start(ValueAnimator.java:1088)
at android.animation.ObjectAnimator.start(ObjectAnimator.java:852)
at android.animation.ValueAnimator.startWithoutPulsing(ValueAnimator.java:1081)
at android.animation.AnimatorSet.handleAnimationEvents(AnimatorSet.java:1142)
at android.animation.AnimatorSet.doAnimationFrame(AnimatorSet.java:1046)
at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146)
at android.animation.AnimationHandler.access$100(AnimationHandler.java:37)
at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer_Delegate.doFrame(Choreographer_Delegate.java:66)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.renderAndBuildResult(RenderSessionImpl.java:563)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.render(RenderSessionImpl.java:425)
at com.android.layoutlib.bridge.BridgeRenderSession.render(BridgeRenderSession.java:120)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:151)
at com.android.ide.common.rendering.api.RenderSession.render(RenderSession.java:133)
at com.android.tools.idea.rendering.RenderTask.lambda$null$8(RenderTask.java:766)
at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)