Android Question edge to edge and debug

andredamen

Active Member
Licensed User
Longtime User
My program works perfect in release mode. In debug mode it crashes on line 162.


ime.Initialize("ime")
root = xui.CreatePanel("")
Dim Content As Rect = ime.GetContentRect
Activity.AddView(root, Content.Left, Content.Top, Content.Width, Content.Height)
ime.UpdatePercentageReference(root.Width, root.Height)
root.LoadLayout("mainpage") ' this is line 162

this is the errormessage:

Error occurred on line: 162 (Main)
java.lang.RuntimeException: java.lang.RuntimeException: Object should first be initialized (ImageView).
Did you forget to call Activity.LoadLayout?
 
Solution
Problem found: I had a file named "kladblok0..jpg" in the "files" folder. It was being used in "root.LoadLayout("Mainpage")". After changing "kladblok0..jpg" to "kladblok0.jpg", the issue in debug mode was resolved. It is strange, though, that the release version—and installing in debug mode on an older tablet—didn't cause any problems.

andredamen

Active Member
Licensed User
Longtime User
Indeed, it doesn't happen with every app for me either. I'm looking into it, but I haven't yet discovered why the debugger throws this error for one app but not for another.
 
Upvote 0

andredamen

Active Member
Licensed User
Longtime User
I get the error message on my Samsung A55 running One UI 8.5, but not on my Samsung tablet A7 Lite running One UI 6.1.
 
Upvote 0

andredamen

Active Member
Licensed User
Longtime User
Problem found: I had a file named "kladblok0..jpg" in the "files" folder. It was being used in "root.LoadLayout("Mainpage")". After changing "kladblok0..jpg" to "kladblok0.jpg", the issue in debug mode was resolved. It is strange, though, that the release version—and installing in debug mode on an older tablet—didn't cause any problems.
 
Upvote 0
Solution
Top