Libgdx file not reading (null) when run on android device -
i'm running game android studio android phone connected pc, , i'm not getting errors not finding file when should loaded, in 'android/assets/items/' folder, file 'someshop.csv', , loaded by:
bufferedreader br = new bufferedreader(new filereader(gdx.files.internal("items/"+place+".csv").file()));
where 'place' = 'someshop'
works fine on desktop, , can read lines:
line = br.readline()
however on phone, entries (text file used build button text) come 'null'. i've cleaned , rebuilt project; no help. need build , deploy (install) project on phone work?
on android, internal filetype not backed actual file. rather, points entry in zip (apk). should use filehandle#reader() method obtain reader can used read file contents.
Comments
Post a Comment