Android Crosswalk Lite - Android Studio integration

后端 未结 2 2002
别跟我提以往
别跟我提以往 2020-12-20 16:33

I have successfully implemented crosswalk webview project inside an Android studio project. Basically by following this link: https://diego.org/2015/01/07/embedding-crosswal

2条回答
  •  心在旅途
    2020-12-20 17:17

    I had the same issue, this is how I resolved.

    I followed the same tutorial, use this repository and dependency instead.

    repositories {
        maven {
            url 'https://download.01.org/crosswalk/releases/crosswalk-lite/android/maven2/'
        }
    }
    

    dependency

    compile 'org.xwalk:xwalk_core_library_canary:17.46.460.1'
    

    Change your MainActivity.java like this

    public class MainActivity extends XWalkActivity {
        XWalkView mXWalkView;
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
        }
    
        public void initXWalkView() {
            mXWalkView = (XWalkView) findViewById(R.id.activity_main);
            mXWalkView.load("file:///android_asset/index-mobile.html", null);
        }
    
        @Override
        protected void onXWalkReady() {
            initXWalkView();
        }
    }
    

    Here, for more info.

提交回复
热议问题