VerifyError:AMFChannel could not be found.

I just set up an ActionScript AIR project with Backendless and I got this error
VerifyError: Error #1014: Class mx.messaging.channels::AMFChannel could not be found.
What is the issue? I’m using FB 4.6

Ah, thanks Mark, I think the problem is this the fact that I was building an ActionScript AIR project and not a Flex AIR project. I think MCoders seriously need to consider some support for AS only AIR applications. Adobe has more or less taken their hands off Flex, so the discrepancies and support issues may increase with each iteration of AIR. I do not have a version of FB 4.7 so I cannot test to see what the support for Flex classes like these are in the newest Adobe offerings. I will set up a Flex project, test and report back

The goal for our Backendless SDK for AS library is to be universal. It should work equally well for both AIR and Flex apps. I think the problem is incompatibility between the compilers and SDK version. We will look into a possibility of adding multiple builds of the SWC into the SDK.

I have a similar issue. I’m building an AS3 AIR app. The first thing I’m trying to do is login a user. It doesn’t fail with an error, but nothing every returns - result or fault. If I take the exact same code put it in a Flex AIR app, it works w/o any issues.

The same issue: VerifyError: Error #1014: Class mx.collections::ArrayCollection could not be found.

I’m bilding ActionScript Mobile project on FlashBuilder 4.7, i.e. only actionscript without flex-libs.

We are looking into this problem. Some refactoring is due in the code…

Hi Alexey,

I am having difficulty reproducing the problem. Any chance you could zip up your project and email it to me? Any sample project demonstrating the problem would work. My email is mark[ at ]@backendless.com.

Thanks!

For ActionScript projects, make sure to add the following libraries to the project build path (see the attached screenshot):

[FLEX SDK]/frameworks/libs/rpc.swc
[FLEX SDK]/frameworks/libs/framework.swc
[FLEX SDK]/frameworks/locale/en_US/rpc_rb.swc
[FLEX SDK]/frameworks/locale/en_US/framework_rb.swc

Also, make sure to make the following call at the starting point of your application:

RpcClassAliasInitializer.registerClassAliases();

The RpcClassAliasInitializer class is in mx.utils namespace, so make sure to import it:

import mx.utils.RpcClassAliasInitializer;

Hope this helps.

Mark

rpc-libs.png

Fuf, i think you should add this classes to backendless library or make notation in the beggining of documentation, cause i also stuck there for a while)

I made my custom library included all needed classes) For me it looks like this ->

package
{
import mx.core.BitmapAsset;
import mx.core.ByteArrayAsset;
import mx.core.ClassFactory;
import mx.core.FontAsset;
import mx.core.SoundAsset;
import mx.core.SpriteAsset;
import mx.collections.ArrayCollection;
import mx.messaging.channels.AMFChannel;
import mx.rpc.remoting.RemoteObject;
import mx.utils.RpcClassAliasInitializer;

public class classes
{
public function classes()
{
ByteArrayAsset;
SpriteAsset;
BitmapAsset;
FontAsset;
SoundAsset;
ArrayCollection;
AMFChannel;
RemoteObject;
RpcClassAliasInitializer;
ClassFactory;
}
}
}

and compiled swc with this in attachment, may be will help for somebody and save time.

flex4embedapi.swc.zip (297.93kB)

For ActionScript projects, make sure to add the following libraries to the project build path (see the attached screenshot):

[FLEX SDK]/frameworks/libs/rpc.swc
[FLEX SDK]/frameworks/libs/framework.swc
[FLEX SDK]/frameworks/locale/en_US/rpc_rb.swc
[FLEX SDK]/frameworks/locale/en_US/framework_rb.swc

Also, make sure to make the following call at the starting point of your application:

RpcClassAliasInitializer.registerClassAliases();

The RpcClassAliasInitializer class is in mx.utils namespace, so make sure to import it:

import mx.utils.RpcClassAliasInitializer;

Hope this helps.

Mark