VerifyError: Error #1014: class could not be found

时间秒杀一切 提交于 2019-12-06 23:56:38

问题


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?


回答1:


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.




回答2:


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!




回答3:


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.




回答4:


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!




回答5:


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:

import some.classpath.to.TheClassThatFailsOnVerify;
function YourMainApp(){ 
    var dummy:TheClassThatFailsOnVerify = new TheClassThatFailsOnVerify (); 
}

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.



来源:https://stackoverflow.com/questions/8019471/verifyerror-error-1014-class-could-not-be-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!