I am building a app to import from a csv file and show the values in the lables from the item selected in the slider.
In the Companion everything works fine but when i compile to apk and install in the cellphone show me this mensage: “Select list item: List index too large Select list item: Attempt to get item number 1 of a list of length 0: ()”
“Reads text from a file in storage. Prefix the filename with / to read from a specific file on the SD card. for instance /myFile.txt will read the file /sdcard/myFile.txt. To read assets packaged with an application (also works for the Companion) start the filename with // (two slashes). If a filename does not start with a slash, it will be read from the applications private storage (for packaged apps) and from /sdcard/AppInventor/data for the Companion.”
I don’t know how but I think the function format is being called somewhere before the event File1.gotText takes place which means that the CSV list Table is an empty list (Its length is 0) and you are trying to get the value of the item at index week (which is 17) which doesn’t exist yet…
I agree with you. The file is uploaded (because in back) i see the values from week 17 but the error mensage is showed!!!
I tried to change the file location with “/” and without “/” and show another mensage " canot find the file…"