ListView non funziona dopo APK

Hello everyone,
A strange thing just happened to me. Practically through the companion; I can easily access the ListView. While after creating the APK; I'm getting this error: :thinking:

Initialise your variable as an empty list, then apply this to the Listview Elements

1 Like

The Companion is like a shared kitchen where no one ever washes the dishes.

There's leftover data in the assets folder and TinyDB from prior Companion testing of this app and prior apps.

When you get errors out of the Companion that you didn't get in the Companion, it means you've been dining off of leftover food scraps.

3 Likes

More specifically, your TinyDB1.GetValue block has an argument valueIfTagNotThere of 0. But since you want to initialize the ListView with this value, you'll need to use create empty list instead so that if the TinyDB is missing the data you will get a list rather than a number.

1 Like

Hello Spicy

Your example is unrelated to Nicola's. Not the first time I have seen you post and only make the Original Poster more confused.

When you see Power Users have the matter in hand, it is not necessary for you to contribute, unless you have noticed something really pertinent that the Power Users have missed.

1 Like

@ABG I know that the companion is like a kitchen where no one ever does the dishes; but the error is displayed to me when I run the APK; while in the companion, everything works perfectly.

@ChrisWard on that, you are absolutely right :wink:

@ewpatton setting TinyDB1.GetValue as create empty list instead of 0, rightly it no longer gives me the error in the APK, thanks

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