Android Question Error with AddTabWithIcon : lang.reflect.ParameterizedType.getActualTypeArguments()

Discussion in 'Android Questions' started by guenneguez_t, Jan 9, 2019.

  1. guenneguez_t

    guenneguez_t Member Licensed User

    Hi

    In my code I have multiple TabHostMain.AddTabWithIcon like :
    TabHostMain.AddTabWithIcon ("", LoadBitmap(File.DirAssets, "map_selected_icon.png"), LoadBitmap(File.DirAssets, "map_icon.png"), "map")
    On one, I have got the following error :
    java.lang.RuntimeException: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.reflect.Type[] java.lang.reflect.ParameterizedType.getActualTypeArguments()' on a null object reference
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
    at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
    at anywheresoftware.b4a.objects.TabHostWrapper.createPanelForLayoutFile(TabHostWrapper.java:117)
    at anywheresoftware.b4a.objects.TabHostWrapper.AddTabWithIcon(TabHostWrapper.java:160)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:733)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:355)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
    at VoileChrono.guenneguez.com.main.afterFirstLayout(main.java:104)
    at VoileChrono.guenneguez.com.main.access$000(main.java:17)
    at VoileChrono.guenneguez.com.main$WaitForLayout.run(main.java:82)
    at android.os.Handler.handleCallback(Handler.java:761)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:156)
    at android.app.ActivityThread.main(ActivityThread.java:6517)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
    Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'java.lang.reflect.Type[] java.lang.reflect.ParameterizedType.getActualTypeArguments()' on a null object reference
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:409)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:454)
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
    ... 19 more
    I think that the problem is du to the map.bal, but I don't know what.
    Who can help me ?

    Thanks
    Thomas
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    You should upload a small project that demonstrates the issue. I recommend you to use TabStripViewPager. Looks and works better.
     
  3. guenneguez_t

    guenneguez_t Member Licensed User

    Hi,

    For TabStrip, it's not possible to use icone for tab...
    I try to make a small projet with this map.bal and it work...
    I try to juste do a simple projet dans it doen't work...

    The current version is availiable here : https://transfernow.net/97f1i0y0ht0k

    berst regards
    thomas
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Should be possible with CSBuilder.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice