FB.Init() Error during release gradle build

I am using Unity 2018.1.6f1 and facebook-unity-sdk-7.13.0. When I try to build the project using gradle, the build is completed successfully but it gives an error while calling FB.Init()

“AndroidJavaException:
java.lang.ClassNotFoundException:
com.facebook.unity.FB”.

I tried the solution in the following links:

I even checked whether I was using debug keyhash, which I was, but I addded release key hash and still getting the same error.

Any help would be appreciated.

P.S. It works fine in debug build

hey did you found how to fix this ? i have the same issue here, please tell me how you did it