Open JokerHYC opened 9 years ago
try to add this line to your proguard file: -keep class cn.pedant.SweetAlert.* { ; }
same wrong?why??? use that demo build jar file, and copy all res file into my project, finally add that jar file. run! java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:
i solved this error by modify the source code the mothod createAnimationFromXml from Class OptAnimationLoader add } else if (name.equals("YOURPATH.Rotate3dAnimation")) { anim = new Rotate3dAnimation(c, attrs); } problem solved...
Thanks a lot! SweetAlert needs Materialish_progress, so I download another open source project. add them all...solved....
I've got the same issue. I didn't understand if the solution is just to add the line -keep class cn.pedant.SweetAlert.* { ; } to the proguard file. Can someone help? Thanks
Instead of adding the library as a dependency in gradle file.
imported the library as a gradle module in my project, Rename it as 'sweetalert' or whatever u like.
then in mothod createAnimationFromXml of Class OptAnimationLoader add else if (name.equals("Rotate3dAnimation")) { anim = new Rotate3dAnimation(c, attrs); } as told above by @JokerHYC
3.include module dependency in app's module as compile project(':sweetalert')
Voila! That's it.
use it
-keep class cn.pedant.SweetAlert.Rotate3dAnimation {
public
java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error: [class android.content.Context, interface android.util.AttributeSet]
at cn.pedant.SweetAlert.OptAnimationLoader.a(OptAnimationLoader.java:77)
at cn.pedant.SweetAlert.OptAnimationLoader.a(OptAnimationLoader.java:64)
at cn.pedant.SweetAlert.OptAnimationLoader.a(OptAnimationLoader.java:41)
at cn.pedant.SweetAlert.OptAnimationLoader.a(OptAnimationLoader.java:22)
at cn.pedant.SweetAlert.SweetAlertDialog.(SweetAlertDialog.java:80)