0

I have found following warning while generation signed apk

im.delight.android.webview.AdvancedWebView$1: can't find referenced method 'void onUnhandledInputEvent(android.webkit.WebView,android.view.InputEvent)' in library class android.webkit.WebViewClient

I don't know what is this please help me to resolve this warning...

my layout file is..

<im.delight.android.webview.AdvancedWebView
    android:id="@+id/about_us_description"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginLeft="5dp"
    android:layout_marginTop="5dp"
    android:layout_marginRight="10dp" />

my java code is...

private AdvancedWebView aboutUs;
aboutUs = aboutUsDialogView.findViewById(R.id.about_us_description);
aboutUs.getSettings().setJavaScriptEnabled(true);
aboutUs.loadDataWithBaseURL("", content, "text/html", "UTF-8", "");
Dinesh Sarma
  • 461
  • 3
  • 14

1 Answers1

0

It is a known issue of AdvancedWebView coming up if you targetSdkVersion higher than 23, where onUnhandledInputEvent was removed from Android SDK.

So, for now, you can solve it in two ways:

1) Set target sdk 23 or lower

2) Import AdvancedWebView as a library. In the onUnhandledInputEvent method, there's a

if (Build.VERSION.SDK_INT >= 21) {

condition. You need changing it to

if (Build.VERSION.SDK_INT >= 21 && Build.VERSION.SDK_INT <= 23) {

or comment this method or just leave the body of this callback empty.

More info about the issue here Hope AdvancedWebView developers will fix this issue soon.

Daniel
  • 2,415
  • 3
  • 24
  • 34