验证错误:错误#1014:找不到类
我正在使用 Flash Builder 4.5(还使用库 Away3D 4.0 和 Flex 4.5.1 SDK)开发 AS3 项目。
另外,我添加了自己的 SWC 库,我之前将其编译到我的项目中。 如果我在 SWC 库中导入类,它会起作用,但是我希望我的 swf 在独立的 Flash 播放器 11 中运行。
我遵循本教程: http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5-4dd43be212e8f90c222-7ffb.html
现在,我可以在 Flash Player 11 中运行我的应用程序,但我得到了运行时错误:
验证错误:错误#1014:找不到 XXX 类
,XXX 是我在 SWC 库中的类。我应该如何解决这个问题?
I'm developing AS3 project using Flash Builder 4.5 (also with library Away3D 4.0 and Flex 4.5.1 SDK).
Also, I add my own SWC library, which I compile previously into my project.
It works find if I import class in my SWC library, however I want my swf run in a stand-alone flash player 11.
I follow this tutorial:
http://help.adobe.com/en_US/flashbuilder/using/WSe4e4b720da9dedb5-4dd43be212e8f90c222-7ffb.html
Now, I could run my app in a flash player 11, but I got an error in run time:
VerifyError: Error #1014: XXX class could not be found
And XXX is my class in SWC library. How should I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
合并到代码中意味着这一点,在项目属性中 -> Flex 构建路径 -> 库路径 -> 框架链接。框架语言有两个选项合并到代码和RSL。选择合并到代码。这应该可以解决你的问题。
Merged into code means this, in project properties -> Flex Build Path -> Library Path -> Framework Linkage. Framework lingage has two options Merged into code and RSL. Chose Merged into code. This should solve your problem.
我们在尝试使用本机扩展构建项目时遇到了这个问题。
NE 中的类在运行时无法找到,但可以在 Flash Builder 中访问。
事实证明,默认情况下 .ANE 文件不会复制到设备中。
要解决此问题,请更改以下项目属性:
ActionScript Build Packaging ->苹果 iOS ->本机扩展 -> 检查 ANE 的“包”
不知道为什么默认情况下不包含它。当您取消选中“Package”时,您会收到一条警告,告诉您它可能会导致运行时问题!
We had this problem when trying to build a project using a Native Extension.
Classes within the NE weren't being found at runtime, but were accessible in Flash Builder.
It turned out that by default the .ANE file wasn't copied to the device.
To fix this, change the following project property:
ActionScript Build Packaging -> Apple iOS -> Native Extensions -> Check 'Package' for the ANE
No idea why it wasn't included by default. When you uncheck 'Package' you get a warning telling you that it may cause runtime issues!
就我而言,我们有一个对同一库的嵌套引用,需要在其他库也使用它之前加载它。可以通过取消选中“根据依赖关系自动确定库排序”并将库在构建路径库链中向上移动来完成此修复。 Flash Builder 无法根据依赖关系确定正确的顺序,因为我们有同一库的 2 个不同版本。该错误只会在运行时发生。
In my case, we had a nested reference to the same library which needed to load before the other library also using it. This fix can be accomplished by unchecking the 'Automatically determine library ordering based on dependencies' and moving the library up in the chain of Build path libraries. Flash Builder was unable to determine the correct order base on dependencies because we had 2 different versions of the same library. The error would only happen during run time.
我在安装 AIR 3.9 并尝试升级项目后遇到了这个问题。
它还表示存在 RSL 错误,然后抛出一系列 #1014 错误。
在我将高级 ActionScript 设置中的 textLayout.swc 链接类型设置为“合并到代码中”而不是默认值 (RSL) 后,它起作用了
希望这会有所帮助!
I had this problem after installing AIR 3.9 and trying to upgrade a project.
It was also saying there was an RSL error, before throwing a succession of #1014 errors.
It worked after I set the textLayout.swc link type in Advanced ActionScript Settings to 'merged into code' instead of the default (RSL)
Hope this helps!
由于我登陆此页面搜索此错误消息,并且上述解决方案都不适合我,因此我最终设法解决它:
似乎这个错误特别是当您包含使用旧编译器编译的旧库时会发生但使用新的应用程序编译您的应用程序。不幸的是,有时会引发错误,而当您再次编译时,它不会发生;有时它在调试版本中工作正常,但在发布版本中却失败。
对我有用的是在主应用程序中包含虚拟对象,这些对象是验证错误抱怨的类的实例:
至少在我的情况下,错误仅针对未直接在应用程序中使用但仅在应用程序内部使用的类触发 。 swc 库代码,因此通过在主应用程序中使用虚拟对象,我强制 Flash Builder 在编译中包含这些类。
在某些情况下,您可能必须首先找到包含相关类的 swc,因为它不是您使用的库 swc 的一部分,但它又是 swc 使用自身的库。
Since I landed on this page searching for this error message and none of the above solutions worked for me, here's how I finally managed to work around it:
It seems that this error happens particularly when you include old libraries that were compiled with the old compiler but compile your app with the new one. Unfortunately the error sometimes fires and when you compile again it doesn't; at other times it works fine in the debug version but then it fails in the release.
What worked for me is to include dummy objects in your main app which are instances of the class that the verify error complains about:
At least in my case the errors only fired for classes that were not used directly in the app but only internally in the swc library code, so by having the dummy objects in the main app I force Flash Builder to include those classes in the compilation.
In some cases you might have to first find the swc that contains the class in question since it's not part of the library swc you use but it's again a library that that swc uses itself.