1

My app occasionally gets this onDragEvent error causing it to crash:

java.lang.NullPointerException: 
  at org.chromium.android_webview.AwContents$AwViewMethodsImpl.onDragEvent (AwContents.java:3122)
  at com.android.webview.chromium.WebViewChromium.onDragEvent (WebViewChromium.java:32969)
  at android.webkit.WebView.onDragEvent (WebView.java:2554)
  at android.view.View.callDragEventHandler (View.java:20927)
  at android.view.View.dispatchDragEvent (View.java:20915)
  etc...

 

According to a StackOverflow answer I found:

The problem is due to admob banner. If it refreshes during a drag, the target of drag is set to null.

and I do also have an admob banner in my activity:

    AdView adView = findViewById(R.id.game_ad);
    AdRequest adRequest = new AdRequest.Builder().build();
    adView.loadAd(adRequest);

but I have trouble replicating the error.

 

Is this actually the cause?

If so, how do I prevent admob from refreshing during a dragEvent (or is there another solution)?

Eddie
  • 132
  • 1
  • 11

0 Answers0