IntelliJ 中的 FlexUnit4

发布于 2024-09-01 06:30:37 字数 1338 浏览 8 评论 0 原文

当我尝试使用 FlexUnit4 和 IntelliJ 运行测试时,出现此错误:

SecurityError: Error #2148: SWF file file:///C|/Users/LIC/Projects/ProgramJef/out/production/Flex%2DClient%2DTests/%5Fflexunit.swf cannot access local resource file:///C|/Users/LIC/Projects/ProgramJef/out/production/Flex%2DClient%2DTests/textLayout_1.1.0.604.swf. Only local-with-filesystem and trusted local SWF files may access local resources.
    at flash.net::URLStream/load()
    at flash.net::URLLoader/load()
    at mx.core::CrossDomainRSLItem/load()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\CrossDomainRSLItem.as:240]
    at mx.core::RSLListLoader/loadNext()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\RSLListLoader.as:184]
    at mx.core::RSLListLoader/load()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\RSLListLoader.as:156]
    at mx.preloaders::Preloader/initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\preloaders\Preloader.as:279]
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:1925]
    at mx.managers::SystemManager/initHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2419]

我真的不知道问题出在哪里,而且我在网上找不到任何内容。即使在 IntelliJ 和 FlexUnit4 上也没有太多可找到的......

When I try to run test with FlexUnit4 and IntelliJ, I get this error:

SecurityError: Error #2148: SWF file file:///C|/Users/LIC/Projects/ProgramJef/out/production/Flex%2DClient%2DTests/%5Fflexunit.swf cannot access local resource file:///C|/Users/LIC/Projects/ProgramJef/out/production/Flex%2DClient%2DTests/textLayout_1.1.0.604.swf. Only local-with-filesystem and trusted local SWF files may access local resources.
    at flash.net::URLStream/load()
    at flash.net::URLLoader/load()
    at mx.core::CrossDomainRSLItem/load()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\CrossDomainRSLItem.as:240]
    at mx.core::RSLListLoader/loadNext()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\RSLListLoader.as:184]
    at mx.core::RSLListLoader/load()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\RSLListLoader.as:156]
    at mx.preloaders::Preloader/initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\preloaders\Preloader.as:279]
    at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:1925]
    at mx.managers::SystemManager/initHandler()[E:\dev\4.x\frameworks\projects\framework\src\mx\managers\SystemManager.as:2419]

I really wouldn't know what the problem is here, and I can't find anything on it online. Even on IntelliJ and FlexUnit4 there's not much to find...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

晒暮凉 2024-09-08 06:30:37

您必须允许生成的 SWF 访问您的文件系统。在文件中设置 Flashplayer 信任设置。在 Linux 上,此文件必须位于

~/.macromedia/Flash_Player/#Security/FlashPlayerTrust/

(对于 Windows,某处有类似的路径)并创建一个列出项目输出路径的文件,例如,

/dev/myproject/target
/dev/anotherproject/target

如果“目标”是我们的输出文件夹。

You must allow the resulting SWF access to your file system. Set the Flashplayer trust settings in a file. On Linux this file must be in

~/.macromedia/Flash_Player/#Security/FlashPlayerTrust/

(for Windows there is a similar path somewhere) and create a file that lists the output path of your project, e.g.

/dev/myproject/target
/dev/anotherproject/target

In case 'target' is our output folder.

无声情话 2024-09-08 06:30:37

您的测试源文件夹设置正确吗?在模块下的项目设置中,添加 Flex,然后单击 Flex 并使用右侧的树结构添加文本源文件夹。

(IntelliJ 9.0.2)

Did you set up your test sources folder right? In Project Settings under Modules, add Flex and click Flex and add Text Source Folders using the tree structure on the right hand side.

(IntelliJ 9.0.2)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文