问题
This code;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
And this layout;
<org.xwalk.core.XWalkView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
Seems to succesfully execute, but then afterwards, I'm presuming on display, results in the Visual Studio Android Emulator crashing with;
02-11 13:31:26.390 17274-17274/in.atqu.androidtest A/libc: Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1), thread 17274 (tqu.androidtest)
I have additionally determined that it;
- Does not crash on my locally attached ARM device
- Does not crash on Android SDK Emulator
- Does not crash if
WebView
is used instead ofXWalkView
- Does not crash if `setContentView(R.layout.activity_main) is commented
- Still crashes if the
XWalkView
is initialized/loaded - Still crashes if the
Activity
is switched toXWalkActivity
I would like to determine whether;
- This can be fixed and;
- This is just an issue with the Visual Studio Android Emulator or;
Whether this symptom would occur on x86 hardware alsoNo reason to presume this now - it runs on x86 Android SDK Emulator
回答1:
its 2016 now and its still a well known issue so it seems this library is still in its beta phase for x86 emulator.
bare in mind that this issue is indeed an emulator only issue. on a real (ARM) android phone the crosswalk app will run just fine.
One of the solutions is indeed to switch the emulator to use an ARM image (rather than x86 Atom based. you might loose some acceleration)
The funny thing is that running the Android emulator on MacOSX works well on all images and doesn't crash.
On Windows and Linux it still crashes the emulator but there is another workaround.
switch to older crosswalk library:
cordova plugin add cordova-plugin-crosswalk-webview --variable XWALK_VERSION="org.xwalk:xwalk_core_library:15+"
(I hope its not too late for you).
来源:https://stackoverflow.com/questions/35329874/crosswalk-crashes-visual-studio-android-emulator