I use XWalkView to load a HTML page,when I exit the Activity,I get this message in the logcat.enter image description here

It seems that I bindService, but not unbindService when exit the Activity.I don't know how to get rid of this problem,who can help me?

 @Override
    protected void onXWalkReady() {
        initXWalkView();
        mXWalkView.load(URL,null);
    }

    @SuppressLint("SetJavaScriptEnabled")
    private void initXWalkView() {
        try {
            Method method = XWalkView.class.getDeclaredMethod("getBridge");
            method.setAccessible(true);
            XWalkViewBridge bridge = (XWalkViewBridge) method.invoke(mXWalkView);
            XWalkSettingsInternal settings = bridge.getSettings();
            settings.setJavaScriptEnabled(true);
        } catch (Exception e) {
            e.printStackTrace();
        }
        WebAppInterface webAppInterface = new WebAppInterface(PatrolActivity.this);
        mXWalkView.addJavascriptInterface(webAppInterface, "GreenSchool");
    }
0

There are 0 best solutions below