以下是我的控制台上的输出:
[SWF] autoupdate.swf - 解压后 3,204,024 字节私有函数 onError(event:ErrorEvent):void [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="Unhandled exception TypeError: Error #1009: Cannot access空对象引用的属性或方法。” 错误ID=1009]
我的代码在应用程序创建事件中 (s:ViewNavigatorApplication)
protected function viewnavigatorapplication1_creationCompleteHandler(event:FlexEvent):void
{
setApplicationVersion();
appUpdater.delay = 1;
appUpdater.isDownloadProgressVisible = true;
appUpdater.isDownloadUpdateVisible = true
appUpdater.isInstallUpdateVisible = true;
appUpdater.isFileUpdateVisible = true;
appUpdater.updateURL = "http://localhost/updater/update.xml";
appUpdater.isCheckForUpdateVisible = false; // sajjad false initially
appUpdater.addEventListener(UpdateEvent.INITIALIZED, onUpdate);
appUpdater.addEventListener(ErrorEvent.ERROR, onError);
appUpdater.initialize();
}
private function onError(event:ErrorEvent):void
{
//Alert.show(event.toString());
trace("private function onError(event:ErrorEvent):void");
trace(event);
}
private function onUpdate(event:UpdateEvent):void
{
trace("private function onUpdate(event:UpdateEvent):void");
appUpdater.checkNow(); // Go check for an update now }
}
我添加了 http://www.adobe.com/devnet/air/articles/air_update_framework.html
是否是我试图将 flex 移动应用程序导出为桌面应用程序并且我需要创建一个仅桌面项目的情况?