download Crosswalk .aar file
https://download.01.org/crosswalk/releases/crosswalk/android/maven2/
Then copy to libs folder
allprojects { repositories { jcenter() flatDir { dirs 'libs' } } }
compile(name:'xwalk_core_library', ext:'aar')
<?xml version="1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="iterator.ir.bmi.MainActivity" tools:ignore="MergeRootFrame"> <org.xwalk.core.XWalkView android:id="@+id/xwalkview" android:layout_width="match_parent" android:layout_height="match_parent"/> </FrameLayout>
public class MainActivity extends XWalkActivity { XWalkView mXWalkView; @Override protected void onXWalkReady() { // Do anyting with the embedding API mXWalkView.load("file:///android_asset/www/index.html", null); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mXWalkView = (XWalkView) findViewById(R.id.xwalkview); } }
References
https://developer.chrome.com/multidevice/webview/gettingstarted
https://crosswalk-project.org/documentation/android/embedding_crosswalk_rvw.html
http://stackoverflow.com/questions/40256449/intellij-idea-how-to-import-aar
https://download.01.org/crosswalk/releases/crosswalk/android/maven2/