web-dev-qa-db-ja.com

Webviewに「クラス「Android.webkit.RenderProcessGoneDetail」が見つかりませんでした」というエラーが表示される

タブレットのAndroidバージョンは7.0で、Chromeバージョン62.0.3202.84です。

WebViewアプリを初めて実行すると、デバッグウィンドウが表示されます

クラス「Android.webkit.RenderProcessGoneDetail」が見つかりませんでした

RenderProcessGoneDetailはAndroid 8.0 APIです

エラーメッセージを防ぐにはどうすればよいですか?

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)
31
byungkyu

バグのようです。詳細はこちら https://groups.google.com/a/chromium.org/forum/#!topic/Android-webview-dev/m0EtO3IXNn

N +では、新しいARTロギングが導入されたようで、アプリ開発者にコードの特定のバイナリ互換性の問題を通知します。残念ながら、これはWebViewのAPIレベルの保護されたコードの一部をトリガーしています。

1つの例は、「失敗した解像度:Landroid/webkit/RenderProcessGoneDetail;」です。これは、O機能を備えたWebViewの最新バージョンがNデバイスで使用されるたびにトリガーされます。これは無害ですが、logcatを見ている開発者にとっては混乱し、スパムです。

29
user1991679

7.0以降のAndroidに問題がありますが、解決策を見つけることができました。私にとっては、 このチュートリアル に従うように働きました。要約すると、フラグメントは次のようになります。

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;
        }
    }

私はこれらの2行を使わずに試しましたが、機能していなかったので、それらを含めて機能しました。それらを追加するように注意してください

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

XSS攻撃に対する脆弱性がある可能性があるという通知があります。できれば、信頼できるWebサイトを開く必要があります。

そして、これがレイアウトです:

<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>

私が解決策を探すのに多くの時間を費やしたので、これが誰かを助けることを願っています

7
palamunder

APIレベル26でWebSettings#setSafeBrowsingEnabled(false)を試すことができます。

参照: WebSettings#setSafeBrowsingEnabled

3
fshdn19