简体   繁体   English

使用适用于Android的Corona SDK构建从DocumentsDirectory子文件夹中打开文件(io.open json或display.newImage)

[英]Open files (io.open json or display.newImage) from DocumentsDirectory subfolder with Corona SDK build for Android

I'm building a lua application with Corona SDK. 我正在用Corona SDK构建lua应用程序。

On Android device, I'm finding not possible to open files (such us json files) from DocumentsDirectory subdirectories after successfully downloaded with network.download. 在Android设备上,使用network.download成功下载后,我发现无法从DocumentsDirectory子目录打开文件(例如json文件)。 However that does work in Corona Simulator! 但是,这在电晕模拟器中确实有效!

So no success with Android device. 因此,使用Android设备无法成功。 On the device, just the files downloaded at DocumentsDirectory root can be opened with no problems, but not the ones placed in subdirectories. 在设备上,可以毫无问题地打开在DocumentsDirectory根目录下下载的文件,但不能打开子目录中的文件。 As I say, Corona Simulator does work well. 就像我说的那样,Corona Simulator表现良好。

Any ideas, please? 有什么想法吗?

I wouldn't understand why that would be happening. 我不明白为什么会这样。 Do you have your phone plugged into your computer and do you run ADB logcat ? 您是否已将手机插入计算机并运行ADB logcat Possibly your phone doesn't load the files fast enough and it times out and gives you an error. 可能是您的手机加载文件的速度不够快,并且超时,并给您一个错误。 You might also want to check to see if your phone supports downloading that kind of file. 您可能还需要检查手机是否支持下载这种文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM