java.lang.RuntimeException: Unable to start activity ComponentInfo{xx.xxxx.android.controller.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference

JIRA | rahul pal | 1 year ago
  1. 0

    Impacted Cases =========== App crashed on using AAR file generated, from building Crosswalk for Android Reproduce Test Steps ==================== Build crosswalk code for target xwalk_core_lib_aar Followed steps in guide to build: echo "{ 'GYP_DEFINES': 'OS=android', }" > chromium.gyp_env rm -rf out/ . ./xwalk/build/android/envsetup.sh export GYP_GENERATORS='ninja' python xwalk/gyp_xwalk ninja -C out/Release xwalk_core_library_aar Use the generated AAR file in AndroidStudio Expected Outcome ================ No crash Same application code works with AAR picked from Crosswalk Release 14.43.343.12. But on using the AAR generated from building Crosswalk, app crashes. Actual Outcome ============== --------- beginning of crash E/AndroidRuntime( 4722): FATAL EXCEPTION: main E/AndroidRuntime( 4722): java.lang.RuntimeException: Unable to start activity ComponentInfo{xx.xxxx.android.controller.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference E/AndroidRuntime( 4722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) E/AndroidRuntime( 4722): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) E/AndroidRuntime( 4722): at android.app.ActivityThread.access$800(ActivityThread.java:151) E/AndroidRuntime( 4722): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) E/AndroidRuntime( 4722): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 4722): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 4722): at android.app.ActivityThread.main(ActivityThread.java:5254) E/AndroidRuntime( 4722): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 4722): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 4722): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) E/AndroidRuntime( 4722): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) E/AndroidRuntime( 4722): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference E/AndroidRuntime( 4722): at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110) E/AndroidRuntime( 4722): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105) E/AndroidRuntime( 4722): at xx.xxx.android.controller.MainActivity.onCreate(MainActivity.java:196) E/AndroidRuntime( 4722): at android.app.Activity.performCreate(Activity.java:5990) E/AndroidRuntime( 4722): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) E/AndroidRuntime( 4722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) Test Case Source Code ===================== Test Builds =========== Issue Analysis ============== Possible that recent PR https://github.com/crosswalk-project/crosswalk/pull/3080 broke this, stack trace is same

    JIRA | 1 year ago | rahul pal
    java.lang.RuntimeException: Unable to start activity ComponentInfo{xx.xxxx.android.controller.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference
  2. 0

    Impacted Cases =========== App crashed on using AAR file generated, from building Crosswalk for Android Reproduce Test Steps ==================== Build crosswalk code for target xwalk_core_lib_aar Followed steps in guide to build: echo "{ 'GYP_DEFINES': 'OS=android', }" > chromium.gyp_env rm -rf out/ . ./xwalk/build/android/envsetup.sh export GYP_GENERATORS='ninja' python xwalk/gyp_xwalk ninja -C out/Release xwalk_core_library_aar Use the generated AAR file in AndroidStudio Expected Outcome ================ No crash Same application code works with AAR picked from Crosswalk Release 14.43.343.12. But on using the AAR generated from building Crosswalk, app crashes. Actual Outcome ============== --------- beginning of crash E/AndroidRuntime( 4722): FATAL EXCEPTION: main E/AndroidRuntime( 4722): java.lang.RuntimeException: Unable to start activity ComponentInfo{xx.xxxx.android.controller.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference E/AndroidRuntime( 4722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) E/AndroidRuntime( 4722): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) E/AndroidRuntime( 4722): at android.app.ActivityThread.access$800(ActivityThread.java:151) E/AndroidRuntime( 4722): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) E/AndroidRuntime( 4722): at android.os.Handler.dispatchMessage(Handler.java:102) E/AndroidRuntime( 4722): at android.os.Looper.loop(Looper.java:135) E/AndroidRuntime( 4722): at android.app.ActivityThread.main(ActivityThread.java:5254) E/AndroidRuntime( 4722): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 4722): at java.lang.reflect.Method.invoke(Method.java:372) E/AndroidRuntime( 4722): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903) E/AndroidRuntime( 4722): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) E/AndroidRuntime( 4722): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference E/AndroidRuntime( 4722): at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110) E/AndroidRuntime( 4722): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105) E/AndroidRuntime( 4722): at xx.xxx.android.controller.MainActivity.onCreate(MainActivity.java:196) E/AndroidRuntime( 4722): at android.app.Activity.performCreate(Activity.java:5990) E/AndroidRuntime( 4722): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) E/AndroidRuntime( 4722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) Test Case Source Code ===================== Test Builds =========== Issue Analysis ============== Possible that recent PR https://github.com/crosswalk-project/crosswalk/pull/3080 broke this, stack trace is same

    JIRA | 1 year ago | rahul pal
    java.lang.RuntimeException: Unable to start activity ComponentInfo{xx.xxxx.android.controller.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference
  3. 0

    App which was built by cordova 4.0 crosswalk 15.44.361.0 will crash when launch it. Impacted Cases ============== All Cordova 4.0 test suites. Reproduce Test Steps ==================== 1. {{cordova create foo com.example.foo foo}} 2. {{cd foo; cordova platform add android}} 3. Download cordova-plugin-crosswalk-webview and setting webview config: {{vim cordova-plugin-crosswalk-webview/src/android/xwalk.gradle}} change: "_beta:13+" to ":15.44.361.0" change: maven { url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' } to mavenLocal() 4. Install webview plugin with maven:{{mvn install:install-file -DgroupId=org.xwalk -DartifactId=xwalk_core_library -Dversion=15.44.361.0 -Dpackaging=aar -Dfile=<path>/crosswalk-15.44.361.0.aar -DgeneratePom=true}} 4. {{cordova plugin add ../cordova-plugin-crosswalk-webview}} 5. Connect device and run:{{cordova run android}} Expected Outcome ================ cordova app run successfully. Actual Outcome ============== App crashed Test Builds =========== ||Version||Test Date|| Test Device || Result|| |crosswalk 15.43.358.0|2015.06.05| Nexus 4|{color:green}Pass{color}| |crosswalk 15.44.361.0|2015.06.12| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.362.0|2015.06.13| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.363.0|2015.06.14| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.364.0|2015.06.16| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.365.0|2015.06.19| Nexus 4|{color:red}Crash{color} | Issue Analysis ============== adb logcat: {{W/dalvikvm(10050): threadid=1: thread exiting with uncaught exception (group=0x40f5a930) E/AndroidRuntime(10050): FATAL EXCEPTION: main E/AndroidRuntime(10050): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.foo/com.example.foo.MainActivity}: java.lang.RuntimeException: Failed to create webview. E/AndroidRuntime(10050): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) E/AndroidRuntime(10050): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) E/AndroidRuntime(10050): at android.app.ActivityThread.access$600(ActivityThread.java:141) E/AndroidRuntime(10050): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) E/AndroidRuntime(10050): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(10050): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(10050): at android.app.ActivityThread.main(ActivityThread.java:5041) E/AndroidRuntime(10050): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(10050): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(10050): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroidRuntime(10050): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroidRuntime(10050): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(10050): Caused by: java.lang.RuntimeException: Failed to create webview. E/AndroidRuntime(10050): at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:191) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:187) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:135) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:209) E/AndroidRuntime(10050): at com.example.foo.MainActivity.onCreate(MainActivity.java:32) E/AndroidRuntime(10050): at android.app.Activity.performCreate(Activity.java:5104) E/AndroidRuntime(10050): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) E/AndroidRuntime(10050): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) E/AndroidRuntime(10050): ... 11 more E/AndroidRuntime(10050): Caused by: java.lang.reflect.InvocationTargetException E/AndroidRuntime(10050): at java.lang.reflect.Constructor.constructNative(Native Method) E/AndroidRuntime(10050): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) E/AndroidRuntime(10050): at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80) E/AndroidRuntime(10050): ... 19 more E/AndroidRuntime(10050): Caused by: java.lang.NullPointerException E/AndroidRuntime(10050): at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110) E/AndroidRuntime(10050): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkCordovaView.setGlobalPrefs(XWalkCordovaView.java:41) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkCordovaView.<init>(XWalkCordovaView.java:50) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkWebViewEngine.<init>(XWalkWebViewEngine.java:56) E/AndroidRuntime(10050): ... 22 more W/ActivityManager( 517): Force finishing activity com.example.foo/.MainActivity D/dalvikvm( 517): GC_FOR_ALLOC freed 771K, 17% free 15212K/18172K, paused 50ms, total 50ms D/overlay ( 159): Set pipe=RGB1 dpy=0; Set pipe=VG0 dpy=0; Set pipe=VG1 dpy=0; D/overlay ( 159): Unset pipe=VG0 dpy=0; Unset pipe=VG1 dpy=0; Unset pipe=RGB1 dpy=0; W/ActivityManager( 517): Activity pause timeout for ActivityRecord{41af7738 u0 com.example.foo/.MainActivity} I/ActivityManager( 517): No longer want com.android.vending (pid 8637): empty for 2193s W/ActivityManager( 517): Scheduling restart of crashed service com.android.vending/com.google.android.finsky.services.DailyHygiene in 5000ms }}

    JIRA | 1 year ago | Hao Yunfei
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.foo/com.example.foo.MainActivity}: java.lang.RuntimeException: Failed to create webview.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    App which was built by cordova 4.0 crosswalk 15.44.361.0 will crash when launch it. Impacted Cases ============== All Cordova 4.0 test suites. Reproduce Test Steps ==================== 1. {{cordova create foo com.example.foo foo}} 2. {{cd foo; cordova platform add android}} 3. Download cordova-plugin-crosswalk-webview and setting webview config: {{vim cordova-plugin-crosswalk-webview/src/android/xwalk.gradle}} change: "_beta:13+" to ":15.44.361.0" change: maven { url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2' } to mavenLocal() 4. Install webview plugin with maven:{{mvn install:install-file -DgroupId=org.xwalk -DartifactId=xwalk_core_library -Dversion=15.44.361.0 -Dpackaging=aar -Dfile=<path>/crosswalk-15.44.361.0.aar -DgeneratePom=true}} 4. {{cordova plugin add ../cordova-plugin-crosswalk-webview}} 5. Connect device and run:{{cordova run android}} Expected Outcome ================ cordova app run successfully. Actual Outcome ============== App crashed Test Builds =========== ||Version||Test Date|| Test Device || Result|| |crosswalk 15.43.358.0|2015.06.05| Nexus 4|{color:green}Pass{color}| |crosswalk 15.44.361.0|2015.06.12| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.362.0|2015.06.13| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.363.0|2015.06.14| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.364.0|2015.06.16| Nexus 4|{color:red}Crash{color} | |crosswalk 15.44.365.0|2015.06.19| Nexus 4|{color:red}Crash{color} | Issue Analysis ============== adb logcat: {{W/dalvikvm(10050): threadid=1: thread exiting with uncaught exception (group=0x40f5a930) E/AndroidRuntime(10050): FATAL EXCEPTION: main E/AndroidRuntime(10050): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.foo/com.example.foo.MainActivity}: java.lang.RuntimeException: Failed to create webview. E/AndroidRuntime(10050): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180) E/AndroidRuntime(10050): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) E/AndroidRuntime(10050): at android.app.ActivityThread.access$600(ActivityThread.java:141) E/AndroidRuntime(10050): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) E/AndroidRuntime(10050): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(10050): at android.os.Looper.loop(Looper.java:137) E/AndroidRuntime(10050): at android.app.ActivityThread.main(ActivityThread.java:5041) E/AndroidRuntime(10050): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(10050): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(10050): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) E/AndroidRuntime(10050): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) E/AndroidRuntime(10050): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(10050): Caused by: java.lang.RuntimeException: Failed to create webview. E/AndroidRuntime(10050): at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:82) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.makeWebViewEngine(CordovaActivity.java:191) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:187) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:135) E/AndroidRuntime(10050): at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:209) E/AndroidRuntime(10050): at com.example.foo.MainActivity.onCreate(MainActivity.java:32) E/AndroidRuntime(10050): at android.app.Activity.performCreate(Activity.java:5104) E/AndroidRuntime(10050): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) E/AndroidRuntime(10050): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) E/AndroidRuntime(10050): ... 11 more E/AndroidRuntime(10050): Caused by: java.lang.reflect.InvocationTargetException E/AndroidRuntime(10050): at java.lang.reflect.Constructor.constructNative(Native Method) E/AndroidRuntime(10050): at java.lang.reflect.Constructor.newInstance(Constructor.java:417) E/AndroidRuntime(10050): at org.apache.cordova.CordovaWebViewImpl.createEngine(CordovaWebViewImpl.java:80) E/AndroidRuntime(10050): ... 19 more E/AndroidRuntime(10050): Caused by: java.lang.NullPointerException E/AndroidRuntime(10050): at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110) E/AndroidRuntime(10050): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkCordovaView.setGlobalPrefs(XWalkCordovaView.java:41) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkCordovaView.<init>(XWalkCordovaView.java:50) E/AndroidRuntime(10050): at org.crosswalk.engine.XWalkWebViewEngine.<init>(XWalkWebViewEngine.java:56) E/AndroidRuntime(10050): ... 22 more W/ActivityManager( 517): Force finishing activity com.example.foo/.MainActivity D/dalvikvm( 517): GC_FOR_ALLOC freed 771K, 17% free 15212K/18172K, paused 50ms, total 50ms D/overlay ( 159): Set pipe=RGB1 dpy=0; Set pipe=VG0 dpy=0; Set pipe=VG1 dpy=0; D/overlay ( 159): Unset pipe=VG0 dpy=0; Unset pipe=VG1 dpy=0; Unset pipe=RGB1 dpy=0; W/ActivityManager( 517): Activity pause timeout for ActivityRecord{41af7738 u0 com.example.foo/.MainActivity} I/ActivityManager( 517): No longer want com.android.vending (pid 8637): empty for 2193s W/ActivityManager( 517): Scheduling restart of crashed service com.android.vending/com.google.android.finsky.services.DailyHygiene in 5000ms }}

    JIRA | 1 year ago | Hao Yunfei
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.foo/com.example.foo.MainActivity}: java.lang.RuntimeException: Failed to create webview.
  6. 0

    Impacted Cases ============== Reproduce Test Steps ==================== download crosswalk-cordova-15.43.349.0-x86.zip 1. create a project with activity which inherit from CordovaActivity 2. load url in onCreate() 3. run the project Expected Outcome ================ Cordova works fine Actual Outcome ============== Cordova crashed when launch the project. Please look at the following info: {code}05-20 15:57:27.442: E/AndroidRuntime(2452): java.lang.ExceptionInInitializerError 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.makeWebView(CordovaActivity.java:350) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:386) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:378) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.dengly.example.firstcordova.MainActivity.onCreate(MainActivity.java:36) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.Activity.performCreate(Activity.java:5104) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2227) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2313) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.access$600(ActivityThread.java:144) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.os.Handler.dispatchMessage(Handler.java:99) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.os.Looper.loop(Looper.java:152) 05-20 15:57:27.442: E/AndroidRuntime(2452): at android.app.ActivityThread.main(ActivityThread.java:5132) 05-20 15:57:27.442: E/AndroidRuntime(2452): at java.lang.reflect.Method.invokeNative(Native Method) 05-20 15:57:27.442: E/AndroidRuntime(2452): at java.lang.reflect.Method.invoke(Method.java:511) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 05-20 15:57:27.442: E/AndroidRuntime(2452): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 05-20 15:57:27.442: E/AndroidRuntime(2452): at dalvik.system.NativeStart.main(Native Method) 05-20 15:57:27.442: E/AndroidRuntime(2452): Caused by: java.lang.NullPointerException 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:107) 05-20 15:57:27.442: E/AndroidRuntime(2452): at org.apache.cordova.CordovaWebView.<clinit>(CordovaWebView.java:905){code} Test Case Source Code ===================== Test Builds =========== Issue Analysis ============== xwalk library was not initialized.

    JIRA | 2 years ago | Hengzhi Wu
    java.lang.ExceptionInInitializerError

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'android.content.Context org.xwalk.core.XWalkApplication.getApplicationContext()' on a null object reference

      at org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode()
    2. org.xwalk.core
      XWalkPreferences.setValue
      1. org.xwalk.core.XWalkCoreWrapper.initEmbeddedMode(XWalkCoreWrapper.java:110)
      2. org.xwalk.core.XWalkPreferences.setValue(XWalkPreferences.java:105)
      2 frames
    3. xx.xxx.android
      MainActivity.onCreate
      1. xx.xxx.android.controller.MainActivity.onCreate(MainActivity.java:196)
      1 frame
    4. Android Platform
      ActivityThread.performLaunchActivity
      1. android.app.Activity.performCreate(Activity.java:5990)
      2. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
      3. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
      3 frames