gpt4 book ai didi

ios - 错误#2044 : Unhandled IOErrorEvent:. 文本=错误#2032:流错误

转载 作者:行者123 更新时间:2023-11-29 13:17:53 25 4
gpt4 key购买 nike

我在 Android 上遇到过这个问题,但我解决了!但在 IOS 中它不起作用,我花了超过 1 天的时间试图解决它。我追踪了文件夹中的所有内容,它给了我正确的路径,但是当我调用声音路径来加载它时,它一直给我这条消息。

这是跟踪的结果

/var/mobile/Applications/A121170F-40A0-4FF8-B93B-238D2B09C797/Documents/story1/zipFolder/mp3/1.mp3
1.mp3
/var/mobile/Applications/A121170F-40A0-4FF8-B93B-238D2B09C797/Documents/story1/zipFolder/mp3/2.mp3
2.mp3
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at buildPageAnimation::LoadAndSetAnimation/loadComplete()[D:\TestUnZipFile\Ipad-new methods for animations - unzip\src\buildPageAnimation\LoadAndSetAnimation.as:95]
at buildPageAnimation::LoadAndSetAnimation/loadComplete()
Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error.
at buildPageAnimation::LoadAndSetAnimation/loadComplete()[D:\TestUnZipFile\Ipad-new methods for animations - unzip\src\buildPageAnimation\LoadAndSetAnimation.as:95]
at buildPageAnimation::LoadAndSetAnimation/loadComplete()

这是代码

    var soundFile:File =  File.documentsDirectory.resolvePath('story1/zipFolder/mp3/');
var files:Array = soundFile.getDirectoryListing();
for (var i:uint = 0; i < files.length; i++)
{
trace(files[i].nativePath);// gets the path of the files
trace(files[i].name);// gets the name
var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();
var lastPosition:Number = 0;
mySound.load(new URLRequest(files[0].nativePath));
myChannel = mySound.play();
}

我尝试过像这样的静态路径 file:///C:/Users/MASTER/Documents/story1/zipFolder/mp3/1.mp3 并且它不起作用请有人可以帮助我。

最佳答案

我还想表示衷心的感谢。

我使用 .nativePath 来提供 URLRequest,而不是 .url。在模拟器 (Windows) 上,无论哪种方式,它都工作得很好,但我在 iOS 上遇到了这个流错误。考虑到我为远程调试编译大约需要 15 分钟,答案如此简单让我大大地松了一口气。

关于ios - 错误#2044 : Unhandled IOErrorEvent:. 文本=错误#2032:流错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15198867/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com