iyegoroff/react-native-text-gradient

[Bug] Production build crashes in RN V0.61.2

Suraj-Tiwari opened this issue · 4 comments

App working if debug build
applied patch #31 (comment) works in both minified & debug enabled/disabled but in production build there is a crash.

2019-10-18 17:35:33.634 31236-31236/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: ********, PID: 31236
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Class java.lang.Object.getClass()' on a null object reference
        at iyegoroff.RNTextGradient.k.a(Unknown Source:2)
        at iyegoroff.RNTextGradient.h.resolveView(Unknown Source:34)
        at iyegoroff.RNTextGradient.h.a(Unknown Source:0)
        at iyegoroff.RNTextGradient.g.a(Unknown Source:8)
        at com.facebook.react.uimanager.ea$q.execute(Unknown Source:8)
        at com.facebook.react.uimanager.ca.run(Unknown Source:72)
        at com.facebook.react.uimanager.ea.kia(Unknown Source:53)
        at com.facebook.react.uimanager.ea.j(Unknown Source:0)
        at com.facebook.react.uimanager.ea$g.T(Unknown Source:31)
        at com.facebook.react.uimanager.c.doFrame(Unknown Source:0)
        at com.facebook.react.modules.core.i$b.doFrame(Unknown Source:46)
        at com.facebook.react.modules.core.a.doFrame(Unknown Source:2)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947)
        at android.view.Choreographer.doCallbacks(Choreographer.java:761)
        at android.view.Choreographer.doFrame(Choreographer.java:693)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
        at android.os.Handler.handleCallback(Handler.java:873)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6718)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

same here

Anyone has solution for this issue?

@jsmile1994 do you have enableProguardInReleaseBuilds = false in app/build.gradle?

Use https://github.com/react-native-community/react-native-masked-view library which is now officially supported for android too.
Dependent library is react-native-linear-gradient.