VerifyError: Error #1014: class could not be found

China☆狼群 提交于 2019-12-05 03:02:49
chintal

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.

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!

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.

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!

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.

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