-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please have your activity extend XWalkActivity for shared mode #4
Comments
@Soyko-Y Are you running on x86 phone or emulator? If yes, you need to add x86's arr file, otherwise can't find x86's so, it will automatically open sharing mode. |
We use crosswalk webview arr file support armeabi-v7a only,so you can use other armeabi-v7a cpu phone. |
On the crosswalk site, I found libraries for arm and for x86. If I download a library for both architectures, then it should work for all devices? Or is it more complicated? And how to create a |
Yes,you can dowload a library for both architectures (arm,x86),you just replace my .arr file, but your apk size will very big, you can have a try,and If have any questions, please tell me! setp3: in the meanwhile,copy aar to your project app/libs here: modify name . |
@fantasy525 Thank you very much for the detailed guidance. I did everything as you described and the problem with shared mode was solved. But there was a new problem. "HomeScreen" - it's my file where I use "RCTCrossWalkWebView" If you know, how to solve it, please, help me. |
@Soyko-Y you check your local npm package, in RCTCrossWalkWebView.js /**
* 此处requireNativeComponent的第一个参数为源码corssWalkWebViewGroupManager 中
* public static final String REACT_CLASS = "CrosswalkWebView"; 的值,不能随便写,否则会提示找不到模块
*/
const NativeCrosswalkWebView = requireNativeComponent('CrosswalkWebView', RCTCrossWalkWebView, {
nativeOnly: {
messagingEnabled: PropTypes.bool,
},
});
export {RCTCrossWalkWebView} ; I export {RCTCrossWalkWebView}, so you need do this: import { RCTCrossWalkWebView } from 'react-native-crosswalk-webview-plus' if this not work,please install latest version. |
@fantasy525 I checked local npm package, in RCTCrossWalkWebView.js. In RCTCrossWalkWebView.js:
In index.js:
And import like this:
Now everything works and I'm happy. Thank you, @fantasy525 :) |
@Soyko-Y OK,enjoy yourself! |
i found the this problem new XWalkView(this).onDestroy();
and android build fail, could you help how resolve this problem ? |
@Domingowen Hi,Are you in a Shared mode?and do you use both x86 and arm aar? |
in proguard-rules.pro
|
Hi, everybody!
I have the latest version of xwalk library: 23.53.589.4
I did everything as written in readme.md.
Added
new XWalkView (getApplicationContext ()). OnDestroy ();
And on this line falls error:java.lang.RuntimeException: Please have your activity extend XWalkActivity for shared mode
Please tell me what to do, how to fix the error and start the application. Maybe there are examples of working applications. Share them, I will be grateful.
Best regards.
Yury
The text was updated successfully, but these errors were encountered: