Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Webview shows error "Didn't find class "android.webkit.RenderProcessGoneDetail"

My tablet Android version is 7.0 and Chrome version 62.0.3202.84.

When first run my webview app, debug window show

Didn't find class "android.webkit.RenderProcessGoneDetail

RenderProcessGoneDetail is android 8.0 API

How do I prevent the error message?

11-28 13:23:13.133 28584-28584/com.himart.omni.himartomniapp I/cr_BrowserStartup: Initializing chromium process, singleProcess=true 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.eb>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/RenderProcessGoneDetail; 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at com.android.webview.chromium.Ap com.android.webview.chromium.WebViewChromiumFactoryProvider.G(android.webkit.WebView, android.content.Context) (WebViewChromiumFactoryProvider.java:323) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (WebViewChromium.java:42) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:636) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:572) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:555) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:542) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:652) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View com.android.internal.policy.PhoneLayoutInflater.onCreateView(java.lang.String, android.util.AttributeSet) (PhoneLayoutInflater.java:58) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.onCreateView(android.view.View, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:724) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:792) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:734) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:865) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:828) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:873) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:828) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:525) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:427) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:378) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.android.internal.policy.PhoneWindow.setContentView(int) (PhoneWindow.java:459) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.Activity.setContentView(int) (Activity.java:2548) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.himart.omni.himartomniapp.view.activity.WebViewActivity.onCreate(android.os.Bundle) (WebViewActivity.java:257) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6955) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1126) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2927) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3045) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1642) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.os.Looper.loop() (Looper.java:154) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6776) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1496) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1386) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.webkit.RenderProcessGoneDetail" on path: DexPathList[[zip file "/data/app/com.android.chrome-1/base.apk"],nativeLibraryDirectories=[/data/app/com.android.chrome-1/lib/arm, /data/app/com.android.chrome-1/base.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]] 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:312) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at com.android.webview.chromium.Ap com.android.webview.chromium.WebViewChromiumFactoryProvider.G(android.webkit.WebView, android.content.Context) (WebViewChromiumFactoryProvider.java:323) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (WebViewChromium.java:42) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int, java.util.Map, boolean) (WebView.java:636) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int, int) (WebView.java:572) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet, int) (WebView.java:555) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.webkit.WebView.<init>(android.content.Context, android.util.AttributeSet) (WebView.java:542) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Object java.lang.reflect.Constructor.newInstance0!(java.lang.Object[]) (Constructor.java:-2) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Object java.lang.reflect.Constructor.newInstance(java.lang.Object[]) (Constructor.java:430) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.createView(java.lang.String, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:652) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View com.android.internal.policy.PhoneLayoutInflater.onCreateView(java.lang.String, android.util.AttributeSet) (PhoneLayoutInflater.java:58) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.onCreateView(android.view.View, java.lang.String, android.util.AttributeSet) (LayoutInflater.java:724) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:792) 11-28 13:23:13.273 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.createViewFromTag(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet) (LayoutInflater.java:734) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:865) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:828) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.view.LayoutInflater.rInflate(org.xmlpull.v1.XmlPullParser, android.view.View, android.content.Context, android.util.AttributeSet, boolean) (LayoutInflater.java:873) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.view.LayoutInflater.rInflateChildren(org.xmlpull.v1.XmlPullParser, android.view.View, android.util.AttributeSet, boolean) (LayoutInflater.java:828) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.inflate(org.xmlpull.v1.XmlPullParser, android.view.ViewGroup, boolean) (LayoutInflater.java:525) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup, boolean) (LayoutInflater.java:427) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at android.view.View android.view.LayoutInflater.inflate(int, android.view.ViewGroup) (LayoutInflater.java:378) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.android.internal.policy.PhoneWindow.setContentView(int) (PhoneWindow.java:459) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.Activity.setContentView(int) (Activity.java:2548) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.himart.omni.himartomniapp.view.activity.WebViewActivity.onCreate(android.os.Bundle) (WebViewActivity.java:257) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.Activity.performCreate(android.os.Bundle) (Activity.java:6955) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.Instrumentation.callActivityOnCreate(android.app.Activity, android.os.Bundle) (Instrumentation.java:1126) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at android.app.Activity android.app.ActivityThread.performLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent) (ActivityThread.java:2927) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.ActivityThread.handleLaunchActivity(android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:3045) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.ActivityThread.-wrap14(android.app.ActivityThread, android.app.ActivityThread$ActivityClientRecord, android.content.Intent, java.lang.String) (ActivityThread.java:-1) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.ActivityThread$H.handleMessage(android.os.Message) (ActivityThread.java:1642) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:102) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.os.Looper.loop() (Looper.java:154) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void android.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6776) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:1496) 11-28 13:23:13.274 28584-28584/com.himart.omni.himartomniapp I/art:     at void com.android.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:1386) 
like image 573
byungkyu Avatar asked Nov 28 '17 04:11

byungkyu


2 Answers

It appears to be a bug, more details here: https://groups.google.com/a/chromium.org/forum/#!topic/android-webview-dev/m0EtO3IXNn0

On N+ new ART logging appears to have been introduced letting app developers know about certain binary compatibility problems in their code. Unfortunately, this is triggering for some of the API-level guarded code in WebView.

One example is "Failed resolution of: Landroid/webkit/RenderProcessGoneDetail;", which is triggered whenever a recent version of WebView with O features is used on an N device. This is harmless, but confusing and spammy to developers looking at logcat.

like image 96
user1991679 Avatar answered Oct 08 '22 04:10

user1991679


There is a problem with Android after 7.0, but I managed to find a solution. For me it worked to follow this tutorial. In a summary the fragment should look like this:

public class WebFragment1 extends Fragment{     public WebFragment1() {         // Required empty public constructor     }      WebView wvPage1;     String url = "http://apptimist.studio";     @Override     public View onCreateView(LayoutInflater inflater, ViewGroup container,                              Bundle savedInstanceState) {          View v = inflater.inflate(R.layout.fragment_web_fragment1, container, false);         wvPage1 = (WebView)v.findViewById(R.id.wvPage1);         wvPage1.loadUrl(url);         WebSettings settings = wvPage1.getSettings();         settings.setJavaScriptEnabled(true);         wvPage1.setWebViewClient(new MyWebViewClient());         return v;     }      private class MyWebViewClient extends WebViewClient{         @Override         public void onPageStarted(WebView view, String url, Bitmap favicon) {             // TODO Auto-generated method stub             super.onPageStarted(view, url, favicon);         }          @SuppressWarnings("deprecation")         @Override         public boolean shouldOverrideUrlLoading(WebView view, String url) {             final Uri uri = Uri.parse(url);             return true;         }          @TargetApi(Build.VERSION_CODES.N)         @Override         public boolean shouldOverrideUrlLoading(WebView view, WebResourceRequest request) {             view.loadUrl(request.getUrl().toString());             return true;         }     } 

I tried without those two lines, but it was not working, so I included them and it worked. Pay attention to add them

WebSettings settings = wvPage1.getSettings(); settings.setJavaScriptEnabled(true); 

There is the notification that there might be a vulnerability to XSS attacks, you should be opening trusted websites preferably.

And here is the layout:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:orientation="vertical"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context="com.kosalgeek.webviewfragment.WebFragment1">      <WebView         android:id="@+id/wvPage1"         android:layout_width="match_parent"         android:layout_height="match_parent"></WebView>  </LinearLayout> 

Hope that this will help someone as I spent a lot of time looking for the solution

like image 20
palamunder Avatar answered Oct 08 '22 02:10

palamunder