Bad Argument to elements

Help! My App works properly with AI Companion. But, when installed on the phone, it shows "Bad Arguments to Elements: The operation Elements cannot accept the arguments: , [""]

You used a TinyDB default value of blank text instead of create empty list.


Or perhaps Elements (ElementsFromString) for a ListView component?

Export your .aia file and post it here.

Yes, I want to use the TinyDB to save the list items

Is it that i cant use a string elements for a list item

Alright i will do it now

shopping_list.aia (8.3 KB)
Here is the aia file. Please, kindly help check.

I beleive this is the part where the error is. Can you help, please?

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

Screen1 Initialize:

This confirms my guess that it was a TinyDB1 default issue.

To fix this, change the block as shown, and remove that tag from the device to flush the bad data.

Also check all the other Screens for this error.

1 Like

Thank you. That's helpful

I celebrate you. its works. Thanks so much

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.