Crosswalk crashes Visual Studio Android Emulator

拜拜、爱过 提交于 2019-12-02 06:26:13

问题


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 of XWalkView
  • 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 to XWalkActivity

I would like to determine whether;

  1. This can be fixed and;
  2. This is just an issue with the Visual Studio Android Emulator or;
  3. Whether this symptom would occur on x86 hardware also No 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!