gpt4 book ai didi

air - 试图让第一个空气应用程序工作

转载 作者:行者123 更新时间:2023-12-01 14:00:54 24 4
gpt4 key购买 nike

我正在尝试让我的第一个 AIR 应用程序运行,但我不断收到一个

application descriptor not found error

我在 Windows 系统上,并已将我的环境路径设置为包括 C:\air\bin,因此当我键入 adl 时,它会调用该 exe。我还从创建的目录中运行该项目,因此在命令提示符下我这样运行:

C:_Projects\The wasteland\HelloWorld\adl HelloWorld.html

HelloWorld.html

<html>
<head>
<title>Hello World</title>
<script src=”AIRAliases.js” type=”text/javascript”></script>
<script type=”text/javascript”>
function appLoad(){
air.trace(“Hello World”);
}
</script>
</head>
<body onLoad=”appLoad()”>
<h1>Hello World</h1>
</body>
</html>

HelloWorld-app.xml

<application xmlns=”http://ns.adobe.com/air/application/1.0?>
<id>examples.html.HelloWorld</id>
<version>0.1</version>
<filename>HelloWorld</filename>
<initialWindow>
<content>HelloWorld.html</content>
<visible>true</visible>
<width>400</width>
<height>200</height>
</initialWindow>
</application>

最佳答案

通常,该错误是由 XML 文件中的问题引起的。看起来您在 XML 文件的 application 元素中的 xmlns 属性末尾缺少引号。试试这个:

<application xmlns="http://ns.adobe.com/air/application/1.0?">

此外,请确保您使用的是直引号 " 而不是弯引号 。如果您要从已将代码复制到其中的站点复制文本,这一点尤其重要像 MS Word 这样的转换引号的应用程序。

最后,不要忘记声明。这应该是您文件的第一行:

<?xml version="1.0" encoding="UTF-8"?>

关于air - 试图让第一个空气应用程序工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5681229/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com