Invoke: no method named `FontSizeDetail' in class com.google.appinventor.components.runtime.ListView

I keep getting this error: invoke: no method named `FontSizeDetail' in class com.google.appinventor.components.runtime.ListView

Why does this happen? and how can I fix it?

Make sure your Companion is up to date, for starters.

2 Likes

The property in question was introduced in companion version 2.61. Either reset the property to its default value or update your companion to use version 2.61 or later.

2 Likes

I have my companion app on 2.62, it should be working but it keeps popping up.

show you blocks

This is probably related to this bug

you may be able to workaround this...

Hello, saw a good few of these errors with no clear explanation on how to fix, besides update the companion app or let MIT deal with it...

My issue was -
invoke: no method named `On' in class com.google.appinventor.components.runtime.VerticalArrangement
Note: You will not see another error reported for 5 seconds.

Their was a good few 'On' methods in my blocks. The 'On' method referred to block that checks if a switch is turned on and is typically attached to a IF block or a control block.

image

The problem was due to a personal blunder on my behalf, I think I renamed a Vertical Arrangement format thing to the same name as a switch. Now, MIT blocks doesn't allow blocks to attach to an IF statement if its not logical, and it didn't raise a yellow or red warning.
Basically the IF statement control was now checking/polling if the Vertical Arrangement was "On" and since its not a switch it threw the error message.

The fix was to look for the green "On" methods, look at the drop menu names and change it, then find anywhere else I used that name and select the correct name, you may have to change the name in other control blocks besides the green method block (the name previously in the method wasn't even available!!! Goes to show it's not to hard to catch).

image

My guess is that you have renamed something and the blocks haven't updated. To get on with the project check the names in the drop down name box for the specific method detailed in your error message.

I'm curious how you managed to perform the renaming. App Inventor won't let you rename a component to an existing name, and deleting a component will delete any blocks corresponding to it. Did you happen to pull blocks from the backpack or the clipboard that referenced the old component?

All I know is, once I was knew it was related to the 'On' method blocks. I chose a few random samples of the 'On' method blocks, clicked the drop down menu and the name currently on the box wasn't on the list so I chose the one that I knew I needed and it worked. The renaming was done in the project tree of either the designer or block tab. I'm a wee bit bewildered by it.