I am getting this error when the device changes orientation:
Error: WebView.destroy() called while still attached
With this code:
To avoid the error you just need to remove all views before you destroy the ad.
@Override public void onDestroy() { if (adView != null) { adView.removeAllViews(); adView.destroy(); } super.onDestroy(); }