I have uploaded my app on playstore and it got about 600 downloads in a week ,the problem is that there are about 20 instances of crashing that I have seen on firebase.I tested my app on various phones but it didn't occur to me but about 20 crashes have been reported.I have seen the code multiple times and also searched and read about problem but couldn't find a solution.
Code is of about 150 lines so,Link-https://www.writeurl.com/text/6pydtz3aictqplzk3efs/eq3n03k23ww11wflkzis/vgarvxzcog2ldc96dgei
Actually I am loading a webView here is my code in fragment-
I have 3 fragments and the error reported is-
Exception java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources
android.content.Context.getResources()' on a null object reference
android.widget.Toast.<init> (Toast.java:102)
android.widget.Toast.makeText (Toast.java:266)
com.package.a$6.onReceivedError ()
com.android.webview.chromium.WebViewContentsClientAdapter.onReceivedError2 (WebViewContentsClientAdapter.java:260)
org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleM essage (AwContentsClientCallbackHelper.java:38)
android.os.Handler.dispatchMessage (Handler.java:102)
android.os.Looper.loop (Looper.java:157)
android.app.ActivityThread.main (ActivityThread.java:5571)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:745)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:635).
Please give a word.