2101 File not found error

I keep getting the 2101 File not found error message. I’ve tried with 1, 2 and no slashes in file name. I also manually copied file to SD card root where I understood app would look for it. It works fine with AI Companion, but when I build the .apk via QR code the app can’t find the file. Googling doesn’t find much and a similar problem here didn’t solve my issue.



Try giving permission to read/write external storage on startup ?


If your file is in the assets then you need two slashes: //Feed.csv

ReadFrom( fileName )

Reads text from a file in storage. Prefix the fileName with / to read from a specific file on the SD card (for example, /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 application’s private storage (for packaged apps) and from /sdcard/AppInventor/data for the Companion.

Sorry, I don’t know what to do with “android…STORAGE” but I looked in settings>>App info>my app and it says A) there’s 4K of data (about right), 0 on SD and B) it has SD modify/delete privilege.

I built it 3 ways and I think the last way was no slash. Once I accidentally put a back-slash - dratted DOS.

From what I understand from the Documentation, no matter which you choose, the .apk puts the file where ever it’s supposed to be so it’s just supposed to work.

It should be this straightforward…


HA! Found it. Feed.csv does not equal feed.csv in Android. The strange thing is it worked in the emulator!! The file was named lower “f” and the ReadFrom upper “F”. I’d have never figured it out if I hadn’t started playing with Arduino. 3 versions of DOS, 5 versions of WIndows and a half dozen versions of BASIC are hard to un-do. :slight_smile: :smiley:

Thanks a million - if you’ll take an I O U

Should have known once you started talking about DOS :wink:

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