简体   繁体   中英

Unable to create app, invalid filetype in Phonegap

I am learning Phonegap for the first time. This is a simple app. This will just show "hello world". But whenever I am trying to build it is showing me unable to create app, invalid filetype.

My html code id given below -

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta name="format-detection" content="telephone-no">
        <meta name="viewport" content="user-scalable=no, initial-scale=1, minimum-scale=1, maximum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi">
        <title>Our Application</title>
        <script type="text/javascript" src="condova.js"></script>
    </head>
    <body>
        <h1>Hello World</h1>
    </body>
</html>

Here is my config.xml

<?xml version="1.0" encoding="UTF-8" ?>
    <widget xmlns = "http://www.w3.org/ns/widgets"
        xmlns:gap = "http://phonegap.com/ns/1.0"
        id        = "com.example.pgbuild"
        versionCode="10" 
        version   = "1.0.0">

    <name>Test</name>

    <description>
        Show Hello World
    </description>

    <author href="http://phonegap.com/blog/" email="ryan@adobe.com">
        Eddard Start
    </author>

    <preference name="phonegap-version" value="2.2.0" />
    <preference name="webviewbounce" value="false" />

    <icon src="img/icon.png" />
    <gap:splash src="img/splash.png" />
</widget>

I am following up and running with Phonegap by Lynda. I have included the img folder which contains all the icons. I have also included the cordova.ios.js file. I haven't renamed it because the person in the tutorial also didn't rename it.

Shot in the dark here, but are the files actually saved as .PNG instead of .png?

In a native XCode environment you can get the simulator to run extensions of the wrong case, but it will fail on the device unless the extensions are exact case, just a minor difference in how the device OS scours the bundle vs. the simulator OS

One more shot in the dark:

You have this:

<script type="text/javascript" src="condova.js"></script>

when I think you want cordova.js with an "r"

<script type="text/javascript" src="cordova.js"></script>

If it is as simple as a typo like that, welcome to the club. Sometimes it just takes a while to track down that completely insignificant, and yet crippling bug.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM