Android Question [Solved] How to Rebuild layout.

Martincg

Member
Licensed User
Longtime User
I have a project which works. I removed a label then the project wouldn't compile. I don't remember the error but I think it was something like
"=" expected. go to designer script.

I couldn't see anything wrong in the designer script. I had deleted the label in my module so I tried replacing the label in the designer and generated the member and this stopped the error. To save time I made the label invisible.
Now, in the same project, I want to delete another label, and I get

B4A Version: 9.50
Java Version: 8
Parsing code. (0.05s)
Building folders structure. (0.13s)
Compiling code. (0.16s)
Compiling layouts code. Error
Unassigned variable: 'label1'
Error File: GETtestlayout01.bal

Go to the designer script page to debug this error.

Their is no label1 in the designer script or in my module.

Maybe there is some corruption in the bal file?

Can anyone advise me how to fix it?
Maybe I delete a view the wrong way. I delete it in the designer then I remove references in the Main module.
 

klaus

Expert
Licensed User
Longtime User
Can you post your project as a zip file?

upload_2019-10-13_19-5-15.png


So we can see what you have done and how.
 
Upvote 0

Martincg

Member
Licensed User
Longtime User
If I delete label1 in the design and in Main then compile fails.
Similar problems with label2.
There are also other problems in this project.
I cannot get button2 where the design places it.
AutoTextSizeLabel1 does not have the width set in the design. If I set the width in Main then it is correct.
 

Attachments

  • layoutProblem.zip
    21.1 KB · Views: 129
Upvote 0

Martincg

Member
Licensed User
Longtime User
What Klaus shows is not what I see. There is no label1 in any variant that I can find.

In the designer window menu I can choose script (general) or script (variant). Neither is like you have shown.
I have tried opening the layout from the files folder of the project, I have tested that the layout is saved where I think it is and the project is saved where I think it is but is no line which contains label1 anywhere.
 

Attachments

  • Screenshot - 13_10_2019 , 20_07_17.png
    Screenshot - 13_10_2019 , 20_07_17.png
    15.4 KB · Views: 105
Last edited:
Upvote 0

Martincg

Member
Licensed User
Longtime User
OH! I didn't remember that I had a 480 x 320layout. I'm supposed to only produce portrait.
Thank you Klaus.

I know that was pretty dumb, but in the module IDE, Ctrl F finds the search string in all modules. It's a pity the designer does do similar. This is not an excuse.
 
Last edited:
Upvote 0
Top