pedant / sweet-alert-dialog

SweetAlert for Android, a beautiful and clever alert dialog
http://pedant.github.io
7.27k stars 1.94k forks source link

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

Open ChinaYangYan opened 4 years ago

ChinaYangYan commented 4 years ago

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

F0RIS commented 4 years ago

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

rscherf commented 3 years ago

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

rajesh-karmaker commented 3 years ago

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

<?xml version="1.0" encoding="utf-8"?>

<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"/>-->

fanyufan commented 3 years ago

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

work for me.

ChristophyBarth commented 3 years ago

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

ChristophyBarth commented 3 years ago

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

mohkhz2001 commented 3 years ago

@F0RIS this worked for me thank you

manuelduarte077 commented 2 years ago

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

rezaulkhan111 commented 1 year ago

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 commented 1 year ago

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