Bug? Cant load any layout

Douglas Farias

Expert
Licensed User
Longtime User
Hi.
i dont know how this bug works.
today i m trying to make some demos and examples in b4a and booom
i cant load any layout.

every time i try load a new layout i got this error

Installing file.
PackageAdded: package:sairdoapp.id.exemplo
Copying updated assets files (4)
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (sair) Create, isFirst = true **
Error occurred on line: 20 (sair)
java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (Label).
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:166)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:208)
at sairdoapp.id.exemplo.sair._activity_create(sair.java:335)
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:702)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at sairdoapp.id.exemplo.sair.afterFirstLayout(sair.java:102)
at sairdoapp.id.exemplo.sair.access$000(sair.java:17)
at sairdoapp.id.exemplo.sair$WaitForLayout.run(sair.java:80)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6946)
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:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
Caused by: java.lang.RuntimeException: Object should first be initialized (Label).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.ViewWrapper.innerInitialize(ViewWrapper.java:71)
at anywheresoftware.b4a.objects.LabelWrapper.innerInitialize(LabelWrapper.java:27)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:406)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:425)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:144)
... 21 more
** Activity (sair) Resume **


The error its on this line
B4X:
Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("fechaapp") 'HERE
End Sub

Its a very simple layout with 2 labels and 2 buttons
i m already tryed make a new layout, clean project, put another package name , etc etc but the error continues

How can i fix this? i cant make nothing today
i really dont know how this bug beggins, yesterday i dont got this error and today i have it

B4A 5.80

thx
 
Last edited:
Top