Thanks for using Crosswalk.
Are you using shared mode to build a App? For the different between embedded
mode and shared mode, please check here:
https://crosswalk-project.org/documentation/shared_mode.html
And construct your code like below:
public class MyXWalkActivity extends XWalkActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initialize the activity as usual
setContentView(R.layout.activity_main);
// DO NOT do more than creating an instance with embedding API
mXWalkView = (XWalkView) findViewById(R.id.xwalkview);
}
@Override
protected void onXWalkReady() {
// Do anything with embedding API
mXWalkView.load("index.html", null);
}
}
This code mode is recommended in both embedded mode and shared mode.
Note that if you want use embedded mode, import the xwalk_core_library into
your app instead of xwalk_shared_library, both of them are in Crosswalk
released package.
Best Regards :)
Xiaofeng Zhang
From: Crosswalk-help
[mailto:[email protected]] On Behalf Of 刘晓飞
Sent: Thursday, March 31, 2016 5:31 PM
To: [email protected]
Subject: [Crosswalk-help] Please have your activity extend XWalkActivity for
shared mode
03-31 17:23:10.106 13475-13475/packageName E/art: No implementation found for
boolean org.xwalk.core.internal.XWalkViewDelegate.nativeIsLibraryBuiltForIA()
(tried Java_org_xwalk_core_internal_XWalkViewDelegate_nativeIsLibraryBuiltForIA
and Java_org_xwalk_core_internal_XWalkViewDelegate_nativeIsLibraryBuiltForIA__)
03-31 17:23:10.106 13475-13475/packageName E/AndroidRuntime: FATAL EXCEPTION:
main
03-31 17:23:10.106 13475-13475/packageName E/AndroidRuntime: Process:
packageName, PID: 13475
03-31 17:23:10.106 13475-13475/packageName E/AndroidRuntime:
junit.framework.AssertionFailedError: Please have your activity extend
XWalkActivity for shared mode
03-31 17:23:10.106 13475-13475/packageName E/AndroidRuntime: at
junit.framework.Assert.fail(Assert.java:50)
03-31 17:23:10.106 13475-13475/packageName E/AndroidRuntime: at
org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:189)
03-31 17:23:10.106 13475-13475/packageName E/AndroidRuntime: at
org.xwalk.core.XWalkView.reflectionInit(XWalkView.java:761)
03-31 17:23:10.106 13475-13475/packageName E/AndroidRuntime: at
org.xwalk.core.XWalkView.<init>(XWalkView.java:255)
03-31 17:23:10.106 13475-13475/packageName E/AndroidRuntime: at
packageName.views.CertXWalkView.<init>(CertXWalkView.java:95)
how to solve this error? i find few info from google. thanks :)
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help