sweet-alert-dialog
sweet-alert-dialog copied to clipboard
Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:cn.pedant.SweetAlert.Rotate3dAnimation
Getting this error after enabling obfuscation, here is a full stack trace
2021-09-11 23:36:45.152 10096-10096/<packagename> E/AndroidRuntime: FATAL EXCEPTION: main
Process: <packagename>, PID: 10096
java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:cn.pedant.SweetAlert.Rotate3dAnimation
at a2.b.b(:83)
at a2.b.b(:65)
at a2.b.a(:41)
at a2.b.c(:22)
at a2.k.<init>(:125)
at androidx.fragment.app.Fragment.n1(:2987)
at androidx.fragment.app.t.f(:546)
at androidx.fragment.app.t.m(:282)
at androidx.fragment.app.m.d0(:2189)
at androidx.fragment.app.m.a1(:2106)
at androidx.fragment.app.m.a0(:2002)
at androidx.fragment.app.m$g.run(:524)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:251)
at android.app.ActivityThread.main(ActivityThread.java:7465)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
Tried adding the following rules to my proguard-rules.pro
file but the error still persists
keep class cn.pedant.** { *; }
-keep class cn.pedant.SweetAlert.Rotate3dAnimation {
public <init>(...);
}
-keep class cn.pedant.SweetAlert.Rotate3dAnimation
I am also getting the same error
Got a solution Create a file named error_frame_in.xml in your anim folder and add the following content.
<set xmlns:android="http://schemas.android.com/apk/res/android">
<alpha android:fromAlpha="0"
android:toAlpha="1"
android:duration= "400"
/>
</set>
I am also getting the same error. What do mean by "anim folder". Where should it be? I use this lib within a mobile app. Where should this xml be stored in this case?
I am also getting the same error. What do mean by "anim folder". Where should it be? I use this lib within a mobile app. Where should this xml be stored in this case?
the anim folder means animation folder, can be found in res-resource directory
I have no animation folder or something like that. Can the above XML entry be in any folder? For example I have a folder called XML in which I set general settings.

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).
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).
Nice, but file is read only, how can you modify it?
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).
Nice, but file is read only, how can you modify it?
I downloaded the source code then modified it