尝试让 First Air 应用程序正常工作
我正在尝试让我的第一个 AIR 应用程序正常工作,但我不断收到
找不到应用程序描述符错误
我在 Windows 系统上,并已将环境路径设置为包含 C:\air\bin,因此当我输入 adl 时,它会调用该 exe。我还在创建的目录中运行该项目,因此在命令提示符中我运行如下:
C:_Projects\The 荒地\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>
I am trying to get my first AIR app to work, but I keep getting an
application descriptor not found error
I am on a windows system and have setup my environment path to include C:\air\bin, so when I type adl it calls that exe. I am also running the project from within the directory it is created, so in the command prompt I run like so:
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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,该错误是由 XML 文件中的问题引起的。您的 XML 文件的
application
元素中的xmlns
属性末尾似乎缺少引号。尝试一下:另外,请确保使用直引号
"
而不是弯引号”
。如果您要从已将代码复制到的网站复制文本,这一点尤其重要像 MS Word 这样转换引号的应用程序最后,不要忘记这应该是文件的第一行:
Usually, that error is caused by a problem within your XML file. It looks like you are missing a quotation mark at the end of the
xmlns
attribute in yourapplication
element in your XML file. Try this:Also, make sure you are using straight quotes
"
and not curly quotes”
. This is particularly important if you are copying text from a site that has copied code into an application like MS Word that converts quotes.Finally, don't forget the declaration. This should be the first line of your file: