本文介绍了“错误 #1014:找不到类 mx.core::BitmapAsset"尝试使用运行时共享库​​时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的项目创建了一个运行时共享库​​,我们称之为 ResourceLibrary.它包含我的项目的所有嵌入资产(图像、声音、电影剪辑),并且在许多其他代码位中用作单例.

我正在使用这个批处理编译它(不幸的是 Windows):

SET normalstuff=--namespace+=http://ns.adobe.com/mxml/2009,${flexlib}/mxml-2009-manifest.xml --namespace+=http://www.adobe.com/2006/mxml,${flexlib}/mxml-manifest.xml --namespace+=library://ns.adobe.com/flex/spark,${flexlib}/spark-manifest.xml -external-library-路径 lib -external-library-path+=${flexlib}/libs -external-library-path+=${flexlib}/libs/player/10.0调用 compc -source-path src/-output lib-ext/resources.swc -include-namespaces+=http://MYPROJECT -namespace+=http://MYPROJECT,confs/ResourceLibrary-manifest.xml %normalstuff% -library-path+= 数据/字符 -library-path+=data/menus -library-path+=data/icons/relationships -include-lookup-only=true

这使得我的 resources.swc 文件,当我在我的库中包含这个 swc 并且具有 -static-link-runtime-shared-libraries=true 时.但我不想在我的主 swf 中嵌入我的运行时共享库​​(将文件大小从 10mb 减少到 ~3mb),所以 static-link-runtime-shared-libraries 必须是假的.>

但是,当我运行我的代码时,出现此错误:

[开始与 FDB 的调试会话][故障] 异常,信息=验证错误:错误 #1014:找不到类 mx.core::BitmapAsset.

我一直在琢磨这个可能超级简单的解决方案,但我到处寻找其他人得到的答案是static-link-runtime-shared-libraries to true".

有人对从哪里开始有任何线索/想法吗?

解决方案

我想通了,但忘了在这里发帖.

您需要做的是告诉它要使用的 swf 将位于何处,以及其中将包含哪些类(swc arg)

-runtime-shared-library-path=lib/MyLibrary.swc,MyLibrary.swf

然后我解压缩 swc(使用 7zip,但可以正常工作)并将解压缩的 swf 重命名为MyLibrary.swf"并将其移动到与我的主程序相同的目录中.

I've made a runtime shared library for my project, let's call it ResourceLibrary. It contains all of the embedded assets for my project (images, sounds, movie clips) and it's used as a singleton in a lot of other bits of code.

I am compiling it using this batch (Windows unfortunately):

SET normalstuff=--namespace+=http://ns.adobe.com/mxml/2009,${flexlib}/mxml-2009-manifest.xml --namespace+=http://www.adobe.com/2006/mxml,${flexlib}/mxml-manifest.xml --namespace+=library://ns.adobe.com/flex/spark,${flexlib}/spark-manifest.xml -external-library-path lib -external-library-path+=${flexlib}/libs -external-library-path+=${flexlib}/libs/player/10.0
call compc -source-path src/ -output lib-ext/resources.swc -include-namespaces+=http://MYPROJECT -namespace+=http://MYPROJECT,confs/ResourceLibrary-manifest.xml %normalstuff% -library-path+=data/characters -library-path+=data/menus -library-path+=data/icons/relationships  -include-lookup-only=true

That makes my resources.swc file, which, when I include this swc in my library and have -static-link-runtime-shared-libraries=true. But I want to not embed my runtime shared libraries in my main swf (cuts down the file size from 10mb to ~3mb), so static-link-runtime-shared-libraries must be false.

When I run my code, however, I get this error:

[Starting debug session with FDB]
[Fault] exception, information=VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.

I've been raking my brain over this probably super simple solution, but everywhere I look the answer everyone else gets is "static-link-runtime-shared-libraries to true".

Anyone have any clues/ideas on where to start?

解决方案

I figured this out but forgot to post here.

What you have to do is tell it where the swf to be used will be located, and what classes will be in it (the swc arg)

-runtime-shared-library-path=lib/MyLibrary.swc,MyLibrary.swf

I then extract the swc (using 7zip, but any works) and re-name the extracted swf to "MyLibrary.swf" and move it into the same directory as my main program.

这篇关于“错误 #1014:找不到类 mx.core::BitmapAsset"尝试使用运行时共享库​​时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 11:10