sweet-alert-dialog icon indicating copy to clipboard operation
sweet-alert-dialog copied to clipboard

java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:null

Open ChinaYangYan opened this issue 4 years ago • 10 comments

Run Android Q throw the " java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:null"

ChinaYangYan avatar Mar 06 '20 06:03 ChinaYangYan

check this fork https://github.com/F0RIS/sweet-alert-dialog

F0RIS avatar Mar 08 '20 15:03 F0RIS

This has appear again, even in the above fork, a year later. Any ideas?

rscherf avatar Mar 19 '21 12:03 rscherf

Simple Solution:

  1. Create a "anim" folder under "res" folder
  2. Create xml file under "anim" folder and xml name must be "error_frame_in.xml"
  3. then paste this code

<set xmlns:android="http://schemas.android.com/apk/res/android" xmlns:sweet="http://schemas.android.com/apk/res-auto" android:interpolator="@android:anim/linear_interpolator" android:shareInterpolator="true">

<alpha
    android:fromAlpha="0"
    android:toAlpha="1"
    android:duration="400"/>


<!--<sweet:cn.pedant.SweetAlert.Rotate3dAnimation
    sweet:rollType="x"
    sweet:fromDeg="100"
    sweet:toDeg="0"
    sweet:pivotX="50%"
    sweet:pivotY="50%"
    android:duration="400"/>-->

rajesh-karmaker avatar Mar 25 '21 04:03 rajesh-karmaker

check this fork https://github.com/F0RIS/sweet-alert-dialog

work for me.

fanyufan avatar Mar 30 '21 09:03 fanyufan

F0RIS fork worked! But @rajesh-karmaker's answer looks interesting too!

ChristophyBarth avatar Apr 09 '21 21:04 ChristophyBarth

But @F0RIS, The buttons of the dialog are being cut off.

ChristophyBarth avatar Apr 09 '21 22:04 ChristophyBarth

@F0RIS this worked for me thank you

mohkhz2001 avatar Aug 19 '21 12:08 mohkhz2001

Solución simple:

  1. Cree una carpeta "anim" en la carpeta "res"
  2. Cree un archivo xml en la carpeta "anim" y el nombre xml debe ser "error_frame_in.xml"
  3. luego pega este código
<alpha
    android:fromAlpha="0"
    android:toAlpha="1"
    android:duration="400"/>


<!--<sweet:cn.pedant.SweetAlert.Rotate3dAnimation
    sweet:rollType="x"
    sweet:fromDeg="100"
    sweet:toDeg="0"
    sweet:pivotX="50%"
    sweet:pivotY="50%"
    android:duration="400"/>-->

@vsalguero

manuelduarte077 avatar Oct 19 '21 16:10 manuelduarte077

when app publishes as release mode. inside the 'OptAnimationLoader' class> 'createAnimationFromXml' method> default case ' throw RuntimeException'. I just replace RuntimeException with a break. (library tries to dynamically choose the constructor). https://github.com/rezaulkhan111/sweet-alert-dialog

rezaulkhan111 avatar Nov 29 '22 10:11 rezaulkhan111

158538499-9c591671-1332-4c35-9ad9-60c99b3a662a

rezaulkhan111 avatar Nov 29 '22 10:11 rezaulkhan111