acaziasoftcom / react-native-sweet-alert

SweetAlert native module ports from native Android and iOS libraries for React Native
MIT License
53 stars 18 forks source link

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

Open vsalguero opened 2 years ago

vsalguero commented 2 years ago

FATAL EXCEPTION: mqt_native_modules Process: com.yoleo, PID: 22675 java.lang.RuntimeException: Unknown animation name: cn.pedant.SweetAlert.Rotate3dAnimation error:cn.pedant.SweetAlert.Rotate3dAnimation at cn.pedant.SweetAlert.b.a(Unknown Source:166) at cn.pedant.SweetAlert.b.a(Unknown Source:199) at cn.pedant.SweetAlert.b.a(Unknown Source:5) at cn.pedant.SweetAlert.b.a(Unknown Source:11) at cn.pedant.SweetAlert.k.(Unknown Source:64) at cn.pedant.SweetAlert.k.(Unknown Source:1) at com.clipsub.RNSweetAlert.RNSweetAlertModule.showAlertWithOptions(Unknown Source:6) at java.lang.reflect.Method.invoke(Native Method) at com.facebook.react.bridge.JavaMethodWrapper.invoke(Unknown Source:149) at com.facebook.react.bridge.JavaModuleWrapper.invoke(Unknown Source:21) at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(Unknown Source:0) at android.os.Looper.loop(Looper.java:193) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(Unknown Source:37) at java.lang.Thread.run(Thread.java:764)

manuelduarte077 commented 2 years ago

That mistake is strange, it still came out

JulioRosil commented 1 year ago

Hey @manuelduarte077 @vsalguero , i'm facing this issue three years after installing this plugin. Could you resolve it?

Ayuda amigos centro americanos

vsalguero commented 1 year ago

Hola @JulioRosil fijate que logré solventar el bug, en mi caso usando el siguiente paquete https://www.npmjs.com/package/react-native-sweet-alert

En mi caso la solución fue agregar estas líneas en el archivo android/app/proguard-rules.pro

-keep class cn.pedant.** { *; }
-keep class cn.pedant.SweetAlert.Rotate3dAnimation {
    public <init>(...);
 }

También prueba deshabilitando hermes en el archivo android/app/build.gradle

project.ext.react = [
    enableHermes: false,  // clean and rebuild if changing
]