java.lang.NoSuchMethodError: android.view.Window.setUiOptions

Appcelerator JIRA | Lokesh Choudhary | 2 years ago
  1. 0

    h5.Description: 1. Replace the app.js with the following code: {code} var win = Ti.UI.createWindow({ title: "SplitBar", navBarHidden: false, splitActionBar: true }); win.activity.onCreateOptionsMenu = function(e){ var menu = e.menu; var menuItem = menu.add({ title: "Item1", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); menu.add({ title: "Item2", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); menu.add({ title: "Item3", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); menu.add({ title: "Item4", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); menu.add({ title: "Item5", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); }; win.open(); {code} 2. Build for android 2.3.X device/emulator. h5.Actual Result: 1. The app crashes with following errors: {code} [ERROR] : TiApplication: (main) [305,305] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: android.view.Window.setUiOptions; Titanium 3.5.0,2014/10/06 03:32,bee9e05 [ERROR] : TiApplication: java.lang.NoSuchMethodError: android.view.Window.setUiOptions [ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:520) [ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) [ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615) [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) [ERROR] : TiApplication: at android.app.ActivityThread.access$1500(ActivityThread.java:117) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:130) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:3691) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:507) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method) {code} 2. If the application is built with "splitActionBar: false" the app builds & runs fine. 3. My targetSdkVersion in tiapp.xml is set to 19 and for actionbar the min targetSdkVersion should be 14 or higher h5. Expected Result: 1. The app should not crash & we should be able to see the splitActionBar.

    Appcelerator JIRA | 2 years ago | Lokesh Choudhary
    java.lang.NoSuchMethodError: android.view.Window.setUiOptions
  2. 0

    h5.Description: 1. Replace the app.js with the following code: {code} var win = Ti.UI.createWindow({ title: "SplitBar", navBarHidden: false, splitActionBar: true }); win.activity.onCreateOptionsMenu = function(e){ var menu = e.menu; var menuItem = menu.add({ title: "Item1", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); menu.add({ title: "Item2", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); menu.add({ title: "Item3", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); menu.add({ title: "Item4", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); menu.add({ title: "Item5", showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM }); }; win.open(); {code} 2. Build for android 2.3.X device/emulator. h5.Actual Result: 1. The app crashes with following errors: {code} [ERROR] : TiApplication: (main) [305,305] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: android.view.Window.setUiOptions; Titanium 3.5.0,2014/10/06 03:32,bee9e05 [ERROR] : TiApplication: java.lang.NoSuchMethodError: android.view.Window.setUiOptions [ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:520) [ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) [ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615) [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667) [ERROR] : TiApplication: at android.app.ActivityThread.access$1500(ActivityThread.java:117) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:130) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:3691) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:507) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method) {code} 2. If the application is built with "splitActionBar: false" the app builds & runs fine. 3. My targetSdkVersion in tiapp.xml is set to 19 and for actionbar the min targetSdkVersion should be 14 or higher h5. Expected Result: 1. The app should not crash & we should be able to see the splitActionBar.

    Appcelerator JIRA | 2 years ago | Lokesh Choudhary
    java.lang.NoSuchMethodError: android.view.Window.setUiOptions
  3. 0

    Error using plugin plugin with Spaceadmin and Version 5.2.3

    GitHub | 3 years ago | squievreux
    java.lang.NoSuchMethodError: com.atlassian.confluence.spaces.persistence.dao.SpaceDao.getPermittedSpacesForUser(Lcom/atlassian/user/User;Ljava/lang/String;)Ljava/util/List;
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 113#164884767

    GitHub | 12 months ago | ilipily
    org.bukkit.command.CommandException: Unhandled exception executing command 'prisonranks' in plugin Prison vv2.1.6 Emergency Patch
  6. 0

    Get a java.lang.NoSuchMethodError at javax.ws.rs.core.MultivaluedMap.addAll

    Stack Overflow | 12 months ago | Rajesh
    java.lang.NoSuchMethodError: javax.ws.rs.core.MultivaluedMap.addAll(Ljava/lang/Object;[Ljava/lang/Object;)V

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

      android.view.Window.setUiOptions

      at org.appcelerator.titanium.TiBaseActivity.onCreate()
    2. org.appcelerator.titanium
      TiActivity.onCreate
      1. org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:520)
      2. org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
      2 frames
    3. Android Platform
      ActivityThread.main
      1. android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
      2. android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
      3. android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
      4. android.app.ActivityThread.access$1500(ActivityThread.java:117)
      5. android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
      6. android.os.Handler.dispatchMessage(Handler.java:99)
      7. android.os.Looper.loop(Looper.java:130)
      8. android.app.ActivityThread.main(ActivityThread.java:3691)
      8 frames
    4. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invokeNative(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:507)
      2 frames
    5. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
      2 frames
    6. Android Platform
      NativeStart.main
      1. dalvik.system.NativeStart.main(Native Method)
      1 frame