VerifyError: Error #1014: class could not be found
Asked Answered
C

5

8

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?

Catchpenny answered 5/11, 2011 at 10:7 Comment(2)
I've solved it! when you add Swc folder. It has to be merged into code!Catchpenny
can you elaborate about your solution?Fiduciary
W
10

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.

Wizard answered 10/9, 2012 at 10:39 Comment(2)
Just want to add that for some reason in flash builder 4.6, it only allows you to merge into code if you add the swc folder. Adding the swc file only doesn't let you use merge into code for some reason...Aaronaaronic
If you can't use Merge into code for your RSLs, you might consider reorganizing the reference order of the libraries, more details hereEffector
A
5

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!

Arteriole answered 29/10, 2013 at 18:4 Comment(0)
B
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.

Bedizen answered 10/4, 2013 at 18:28 Comment(0)
K
1

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!

Kiangsu answered 18/10, 2013 at 10:19 Comment(0)
S
1

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.

Severus answered 29/10, 2014 at 16:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.