Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25423] Android: Ti.UI.Slider on Android 4.x is not working, error introduced on SDK 6.2.x

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2017-10-24T22:19:48.000+0000
Affected Version/sRelease 6.2.0
Fix Version/sRelease 6.3.0
ComponentsAndroid
Labelsn/a
ReporterHenry Orozco
AssigneeMaggie Chen
Created2017-10-19T14:02:54.000+0000
Updated2017-10-26T22:01:46.000+0000

Description

Just create an alloy project and add Ti.UI.Slider var slider = Ti.UI.createSlider({ min: 0, max: 100, width: '100%', height: Ti.UI.SIZE, value: 0 }); $.index.add(slider); Run it on an emulator with Android 4.4.4 It works on SDK 6.1.x but not on 6.2.x [ERROR] : TiApplication: (main) [137,137] Sending event: exception on thread: main msg:java.lang.NoSuchMethodError: android.widget.SeekBar.setSplitTrack; Titanium 6.2.0,2017/09/12 20:39,undefined [ERROR] : TiApplication: java.lang.NoSuchMethodError: android.widget.SeekBar.setSplitTrack [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.TiUISlider.processProperties(TiUISlider.java:98) [ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1222) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:516) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:507) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:485) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:523) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:507) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:485) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:695) [ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:588) [ERROR] : TiApplication: at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:261) [ERROR] : TiApplication: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33) [ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:564) [ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:684) [ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:21) [ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:5231) [ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) [ERROR] : TiApplication: at android.app.ActivityThread.access$800(ActivityThread.java:135) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:136) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5001) [ERROR] : TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:515) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) [ERROR] : TiApplication: at dalvik.system.NativeStart.main(Native Method)

Comments

  1. Sharif AbuDarda 2017-10-21

    Hello, I can reproduce the issue in SDK 6.2.x with the below code in Android 4.x.
       var win = Ti.UI.createWindow({
           backgroundColor: '#fff'
       });
        
       var slider = Titanium.UI.createSlider({
           top: 50,
           min: 0,
           max: 100,
           width: Ti.UI.FILL,
           value: 50
           });
       
        
       win.add(slider);
       
       win.open();
       
    The same code works fine for SDK 6.1.x. Thanks.
  2. Maggie Chen 2017-10-23

    PR https://github.com/appcelerator/titanium_mobile/pull/9544
  3. Maggie Chen 2017-10-24

    6_3_X PR: https://github.com/appcelerator/titanium_mobile/pull/9547
  4. Lokesh Choudhary 2017-10-24

    FR passed for both PR's. Master merged. Backport merge waiting for merge to get enabled.
  5. Lokesh Choudhary 2017-10-26

    PR for backport merged.
  6. Lokesh Choudhary 2017-10-26

    Verified the fix in SDK 6.3.0.v20171026120401 & 7.0.0.v20171025141436. Closing. Studio Ver: 4.10.0.201709271713 SDK Ver: 7.0.0.v20171025141436 OS Ver: 10.12.3 Xcode Ver: Xcode 8.3.3 Appc NPM: 4.2.10-2 Appc CLI: 6.3.0-master.15 Ti CLI Ver: 5.0.14 Alloy Ver: 1.10.6 Node Ver: 7.10.1 Java Ver: 1.8.0_101 Devices: ⇨ google Nexus 5 --- Android 6.0.1 ⇨ google Pixel --- Android 7.1.1

JSON Source