Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / [SOLVED] File not found when Broadcasting or Debugging

Author
Message
GH69
6
Years of Service
User Offline
Joined: 9th Nov 2018
Location:
Posted: 22nd Nov 2018 09:23
Hi again, another day another question.

The other day I hit the Debug option just out of curiosity, and was presented with the error "Could not find myfile.txt ...." this is a txt file I read into an array at the very start of my program. It is located in the Media folder of the project. Didn't pay it much attention at the time as I was not really wanting to use the debugger then, and all works fine when just running it.
Today I tried broadcasting to my Android phone for the first time and I experience the same (similar) error message on the phone. "Failed to open file for reading myfile.txt".

I've tried searching the forum but without much success

Can anyone enlighten me as to why this file is found when running the program but not when Debugging or broadcasting??

Cheers
Graham



The author of this post has marked a post as an answer.

Go to answer

blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 22nd Nov 2018 09:40
I have noticed this from time to time and have found that quite often it can be fixed my removing the appfolder
C:\Users\{YourID}\AppData\Local\AGKApps\{Your App}
You'll probably need Admin permission
GH69
6
Years of Service
User Offline
Joined: 9th Nov 2018
Location:
Posted: 22nd Nov 2018 10:01
Thanks for the reply.
Just tried that but unfortunately the error persists in both Debug and Broadcast.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Nov 2018 10:35 Edited at: 23rd Nov 2018 10:35
Maybe try uninstalling and reinstalling both AppGameKit and your the mobile AppGameKit app
GH69
6
Years of Service
User Offline
Joined: 9th Nov 2018
Location:
Posted: 23rd Nov 2018 17:03
Okay, I now have the situation where it now works when running Debug, but crashes with the same error when Broadcasting to my phone.
Something that reads no files broadcasts fine.




blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Nov 2018 20:19 Edited at: 23rd Nov 2018 20:20
This post has been marked by the post author as the answer.
Does the text file have any uppercase letters in it's name?
GH69
6
Years of Service
User Offline
Joined: 9th Nov 2018
Location:
Posted: 23rd Nov 2018 22:47
Yes. Is that an issue? Easily solved if so. Hang on …………………


You Sir are a genius Thank you.


Graham
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 23rd Nov 2018 23:12
Yes. Android file/folder names are case sensitive. Gets me every time!
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 24th Nov 2018 02:10
Another debugging tip. If you create a file in Debug mode AppGameKit sticks it... somewhere. But its not C:\Users\{YourID}\AppData\Local\AGKApps\{Your App}. I have to delete any files I make in debug mode, or else the debug mode will use that location instead of the C:\Users\{YourID}\AppData\Local\AGKApps\{Your App} location.
GH69
6
Years of Service
User Offline
Joined: 9th Nov 2018
Location:
Posted: 24th Nov 2018 09:05
Quote: "Yes. Android file/folder names are case sensitive. Gets me every time!"


I had to look twice at mine as the uppercase character was in the middle of the filename.
Never knew Android was case sensitive. You learn something new every day.

Thanks all.

Login to post a reply

Server time is: 2024-11-23 05:11:40
Your offset time is: 2024-11-23 05:11:40