Material Floating Action Button Causing Error And Crashing Xml
I migrated to androidx
and my dependencies are:
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'com.google.android.material:material:1.1.0-alpha06'
I used FloatingActionButton
:
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentEnd="true"
android:layout_margin="15dp"
app:backgroundTint="@color/colorAccent"
app:srcCompat="@drawable/ic_add_32dp"/>
But when I put FloatingActionButton
, XML crashes(Render Problem). Even when I use the following :
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
However, this error occurs only in XML and does not affect the execution of the program , and it does not show design mode
for me.
The problem with invalidate Cache and Restart
is that it temporarily resolves the issue, but it happens again.
The Render Problem is:
java.lang.IllegalArgumentException: [email protected] 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:-1) 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.setCurrentPlayTime(ValueAnimator.java:637) at android.animation.ValueAnimator.start(ValueAnimator.java:1069) 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.startAnimation(AnimatorSet.java:1227) at android.animation.AnimatorSet.start(AnimatorSet.java:729) at android.animation.AnimatorSet.start(AnimatorSet.java:684) at android.animation.StateListAnimator.start(StateListAnimator.java:188) at android.animation.StateListAnimator.setState(StateListAnimator.java:181) at android.view.View.drawableStateChanged(View.java:21105) at android.widget.ImageView.drawableStateChanged(ImageView.java:1294) at com.google.android.material.floatingactionbutton.FloatingActionButton.drawableStateChanged ... (FloatingActionButton.java:805) at android.view.View.refreshDrawableState(View.java:21160) at android.view.View.dispatchAttachedToWindow(View.java:18379) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404) at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404) at android.view.AttachInfo_Accessor.setAttachInfo(AttachInfo_Accessor.java:42)
Answer
This is a known bug that has been fixed in Studio 3.5beta2!
This issue seems to be elevation properties
For more information see this: https://stackoverflow.com/a/55880655/4254527
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View