Emulator ain't working with TextReader & File.DirInternal with JavaLine: 228 Error

KTC

New Member
Licensed User
Longtime User
Hi,

Basic4Android V1.9.0
Android SDK Tools Rev19
JavaSDK 1.7.0_03
Built for: Android 2.3.3

Edited: The "mytext.txt" file is already stored in the source-code sub-folder "Files"

Problem:
Can someone help point out what is the problem?
Successfully compiled but Emulator can't find the "mytext.txt" file
Thanks :)


Sample Code:
Dim Reader As TextReader
Reader.Initialize(File.OpenInput(File.DirInternal,"mytext.txt"))

Dim line As String
line=Reader.Readline
Do While line <> Null
line=Reader.Readline
Loop
Reader.Close
 
Last edited:
Hi Erel,

Thanks for the prompt reply :sign0098:

Yes, the .txt file is already in the project "Files" sub-folder

Weird, I have playing with it 4 hours with File.DirInternal, File.DirAssets, etc
nothing works but after updated Android SDK and Restart PC it works now :confused: :)

Anyway, thanks for the help

PROBLEM SOLVED!



Was this file added to the project (in the Files tab)?
If yes then it is located in File.DirAssets.
 
Upvote 0
Back
Top