Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4012] Android - scrollableView java.lang.NullPointerException

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2016-07-16T08:54:31.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
Componentsn/a
LabelsscrollableView, titanium
ReporterAnna
AssigneeShak Hossain
Created2016-07-07T10:51:25.000+0000
Updated2016-12-22T08:09:36.000+0000

Description

Hello, I'm using a scrollableView on my app. On iOS all works perfect, but on Android always appear this error:
[ERROR] :  TiApplication: (main) [11106,32386] Sending event: exception on thread: main msg:java.lang.NullPointerException; Titanium 5.4.0,2016/04/25 22:10,63d6351
[ERROR] :  TiApplication: java.lang.NullPointerException
[ERROR] :  TiApplication: 	at ti.modules.titanium.ui.widget.TiUIScrollableView$ViewPagerAdapter.instantiateItem(TiUIScrollableView.java:533)
[ERROR] :  TiApplication: 	at android.support.v4.view.PagerAdapter.instantiateItem(PagerAdapter.java:110)
[ERROR] :  TiApplication: 	at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:870)
[ERROR] :  TiApplication: 	at android.support.v4.view.ViewPager.populate(ViewPager.java:1020)
[ERROR] :  TiApplication: 	at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:552)
[ERROR] :  TiApplication: 	at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:514)
[ERROR] :  TiApplication: 	at android.support.v4.view.ViewPager.dataSetChanged(ViewPager.java:946)
[ERROR] :  TiApplication: 	at android.support.v4.view.ViewPager$PagerObserver.onChanged(ViewPager.java:2910)
[ERROR] :  TiApplication: 	at android.database.DataSetObservable.notifyChanged(DataSetObservable.java:37)
[ERROR] :  TiApplication: 	at android.support.v4.view.PagerAdapter.notifyDataSetChanged(PagerAdapter.java:276)
[ERROR] :  TiApplication: 	at ti.modules.titanium.ui.widget.TiUIScrollableView.setViews(TiUIScrollableView.java:472)
[ERROR] :  TiApplication: 	at ti.modules.titanium.ui.ScrollableViewProxy.handleMessage(ScrollableViewProxy.java:110)
[ERROR] :  TiApplication: 	at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] :  TiApplication: 	at android.os.Looper.loop(Looper.java:146)
[ERROR] :  TiApplication: 	at android.app.ActivityThread.main(ActivityThread.java:5511)
[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:1283)
[ERROR] :  TiApplication:
[ERROR] :  TiApplication: 	at dalvik.system.NativeStart.main(Native Method)
This error appear when this line is executed:
$.lists.setViews(tables_sort);

Comments

  1. Anna 2016-07-11

    I'm having this error now when I scroll Please any solution???
  2. Aminul Islam 2016-07-11

    Hi, Thanks for reaching us. Do you have some test case to demonstrate what you are trying? We can offer you to look into your code and help to identify errors. Regards, Aminul
  3. Dongwoo Gim 2016-12-22

    This is an error when closing a window in a ScrollableView.
  4. Dongwoo Gim 2016-12-22

JSON Source