Android Question [SOLVED] B4XDrawer error ParameterizedType

makis_best

Well-Known Member
Licensed User
Longtime User
Hi

I get the error when I try to load loadlayout.

The code I use for that
B4X:
Sub Globals
    Private Drawer As B4XDrawer
    Private ACToolBarLight1 As ACToolBarLight
    Private ToolbarHelper As ACActionBar
    Private Panel1 As Panel
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    'Activity.LoadLayout("Layout1")
     Drawer.Initialize(Me, "Drawer", Activity, 250dip)
    Drawer.CenterPanel.LoadLayout("EISRITA")
    ACToolBarLight1.Title = "Sales Number " & SalesmanName
    ACToolBarLight1.SubTitle = "Nothing to show"
......

always crash here
Public Sub getCenterPanel As B4XView
Return mCenterPanel
End Sub

and the error

** Activity (tameio) Pause, UserClosed = false **
** Activity (tameio_nea_eispraxh_metrita) Create, isFirst = true **
Error occurred on line: 228 (B4XDrawer)
java.lang.RuntimeException: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:292)
at gr.iosif.droidview.tameio_nea_eispraxh_metrita._activity_create(tameio_nea_eispraxh_metrita.java:400)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at gr.iosif.droidview.tameio_nea_eispraxh_metrita.afterFirstLayout(tameio_nea_eispraxh_metrita.java:104)
at gr.iosif.droidview.tameio_nea_eispraxh_metrita.access$000(tameio_nea_eispraxh_metrita.java:17)
at gr.iosif.droidview.tameio_nea_eispraxh_metrita$WaitForLayout.run(tameio_nea_eispraxh_metrita.java:82)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5376)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
Caused by: java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:407)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:453)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:453)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
... 22 more
** Activity (tameio_nea_eispraxh_metrita) Resume **
 
Last edited:
Top