Java Line error-how to find?

wheretheidivides

Active Member
Licensed User
Longtime User
A newbee question. I changed some things in the designer and now when i compile the program it gives an error and wont install.

java line 548
object should first be intiialized (imageview)



So I am assume I added a image view. So how do i find it? Is there a corrolation between java line 548 and the b4a. It's nont on line 548. I have a lot of code and tons of panels, buttons and things. it'll take a while to go through everything 1 by 1. Just wondering if there is a fast way of finding that it is looking for.
 

Dman

Active Member
Licensed User
Longtime User
You can also look in the sub folders under objects/src and find the java file that corresponds to the file in the error message and open it up with notepad++. That's how I roll. :)
 
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
That did it. Thanks.

Now, the problem. It gives an error on this line
Activity.LoadLayout("LayoutMain.bal")

I have never had this problem before. The layout file is there in files folder. Not sure what the problem is. Just started happening. it's also in rightside of debugger window pane (where you have the folder icon at bottom of screen, click on that and all of the files pop up. ) It's there. When I goto layout deigner I load it and save it.

Anyone got any ideas? and I don't mean super gluing donald trump's lips shut.
 
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
Android is funny about file names. Change your loadlayout()'s file name to all lower case letters. Also change the layout name in the files folder to all lower case as well.

I did and still have a problem.

I have never used the debugger but here is what it says.
Under the local variables it says
'last execption" java.lang runtime exception:java.lang runtime exeption: oblect should first be initilized (imageview).


Does this mean there is a imageview in this layout that needs to be dimed? If so, is there a wuick way to find it without looking for 500 differnt views?
 
Upvote 0

wheretheidivides

Active Member
Licensed User
Longtime User
Margeret, thanks for your help. You got me right there and i did the rest. The problem was in the layoutmain file i changed a file name in the code, but did not change it in an imageview on a panel in the layout designer. so it was looking for a bmp file that was changed.

thanks for the help.
 
Upvote 0
Top