2

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
Stafford Williams
  • 9,696
  • 8
  • 50
  • 101

1 Answers1

2

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).

taitelman
  • 612
  • 5
  • 9
  • How can you switch the emulator to an ARM device? [This](http://stackoverflow.com/questions/32031556/no-phone-emulator-showing-in-device-list-in-visual-studio-2015-rtm) implies its not possible... – Stafford Williams Feb 14 '16 at 05:29
  • switching the emulator to ARM based image: when you download the android SDK (screenshot: http://stackoverflow.com/questions/8739090/android-sdk-manager-is-not-showing-arm-eabi-v7a-system-image-option) you will have a check box for the arm images be sure to check it . then, when creating an emulator (via avd program) you can enter its setting and make it an ARM emulator. – taitelman Feb 15 '16 at 03:31
  • Stafford: you are right. the Q is indeed about VS. so I'm sorry . didn't use Windows for years . seems like an extinct OS. I will try to find someone with Windows 10 and a VisualStudio and will report back. in most cases I saw ,behind the scenes the IntelliJ and eclipse actually call AVD. so I guess VisualStudio also calls AVD. I really think that in your case , the best way is simply connect via USB a real phone. they are so cheap these days. – taitelman Feb 15 '16 at 03:39