开发者

Trying to get first air app to work

开发者 https://www.devze.com 2023-02-25 16:36 出处:网络
I am trying to get my first AIR app to work, but I keep getting an application descriptor not found error

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/appl开发者_StackOverflow中文版ication/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>


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 your application element in your XML file. Try this:

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

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:

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

精彩评论

暂无评论...
验证码 换一张
取 消