title: unable to create app, invalid file type in Phonegap build
body: <p>I am learning Phone-gap for the first time. This is a simple app.  But whenever I am trying to build it is showing me </p>
  
  <blockquote>
    <p>unable to create app, invalid file type.</p>
  </blockquote>
  
  <p>I am showing code of index.html file and config file bellow.</p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>      &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="format-detection" content="telephone=no" /&gt;
      &lt;meta name="msapplication-tap-highlight" content="no" /&gt;
      &lt;meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" /&gt;
      &lt;!-- This is a wide open CSP declaration. To lock this down for production, see below. --&gt;
      &lt;meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline'; style-src 'self' 'unsafe-inline'; media-src *" /&gt;
      &lt;!-- Good default declaration:
      * gap: is required only on iOS (when using UIWebView) and is needed for JS-&gt;native communication
      * https://ssl.gstatic.com is required only on Android and is needed for TalkBack to function properly
      * Disables use of eval() and inline scripts in order to mitigate risk of XSS vulnerabilities. To change this:
          * Enable inline JS: add 'unsafe-inline' to default-src
          * Enable eval(): add 'unsafe-eval' to default-src
      * Create your own at http://cspisawesome.com
      --&gt;
      &lt;!-- &lt;meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: 'unsafe-inline' https://ssl.gstatic.com; style-src 'self' 'unsafe-inline'; media-src *" /&gt; --&gt;
  
      &lt;link rel="stylesheet" type="text/css" href="css/index.css" /&gt;
      &lt;title&gt;hybrid app&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div class="container"&gt;
          &lt;div id="sidebar"&gt;
            &lt;ul&gt;
              &lt;li&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Blog&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;/li&gt;
            &lt;/ul&gt;
          &lt;/div&gt;
          &lt;div class="main-content"&gt;
            &lt;div class="swipe-area"&gt;&lt;/div&gt;
            &lt;a href="#" data-toggle=".container" id="sidebar-toggle"&gt; &lt;span class="bar"&gt;&lt;/span&gt; &lt;span class="bar"&gt;&lt;/span&gt; &lt;span class="bar"&gt;&lt;/span&gt; &lt;/a&gt;
            &lt;div class="content"&gt;
              &lt;h1&gt;Hybrid App&lt;/h1&gt;
              &lt;div class="jquery-script-ads"&gt;&lt;script type="text/javascript"&gt;&lt;!--
  google_ad_client = "ca-pub-2783044520727903";
  /* jQuery_demo */
  google_ad_slot = "2780937993";
  google_ad_width = 728;
  google_ad_height = 90;
  //--&gt;
  &lt;/script&gt;
  
  &lt;/div&gt; &lt;/div&gt;
  
   &lt;div class="para"&gt;
              &lt;p&gt;Hybrid Mobile Applications. Hybrid development combines the best (or worst) of both the native and HTML5 worlds. We define hybrid as a web app, primarily built using HTML5 and JavaScript, that is then wrapped inside a thin native container that provides access to native platform features.&lt;/p&gt;
  
           &lt;/div&gt;
  
           &lt;div&gt;
             &lt;a href=""&gt;&lt;img src="www\com.phonegap.hello-world\master\template_src\www\native_html_hybrid_apps_development_1920_700_1.jpg" width="1300" height="700" alt=""&gt;&lt;/a&gt;
           &lt;/div&gt;
  
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt;
       &lt;script src="http://code.jquery.com/jquery-1.11.3.min.js"&gt;&lt;/script&gt; 
        &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.touchswipe/1.6.4/jquery.touchSwipe.min.js"&gt;&lt;/script&gt; 
        &lt;script&gt;
    $(window).load(function(){
          $("[data-toggle]").click(function() {
            var toggle_el = $(this).data("toggle");
            $(toggle_el).toggleClass("open-sidebar");
          });
           $(".swipe-area").swipe({
                swipeStatus:function(event, phase, direction, distance, duration, fingers)
                    {
                        if (phase=="move" &amp;&amp; direction =="right") {
                             $(".container").addClass("open-sidebar");
                             return false;
                        }
                        if (phase=="move" &amp;&amp; direction =="left") {
                             $(".container").removeClass("open-sidebar");
                             return false;
                        }
                    }
            }); 
        });
  &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-36251023-1']);
    _gaq.push(['_setDomainName', 'jqueryscript.net']);
    _gaq.push(['_trackPageview']);
  
    (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();
  
  &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>config.xml</strong></p>
  
  <pre><code>      &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;!-- config.xml reference: https://build.phonegap.com/docs/config-xml --&gt;
  &lt;widget xmlns     = "http://www.w3.org/ns/widgets"
          xmlns:gap = "http://phonegap.com/ns/1.0"
          id        = "com.phonegap.hybridapp"
          version   = "1.0.0"&gt;
  
      &lt;name&gt;Hybrid App&lt;/name&gt;
  
      &lt;description&gt;
          Hello World sample application that responds to the deviceready event.
      &lt;/description&gt;
  
      &lt;author href="http://phonegap.com" email="nidhinjohny777@gmail.com"&gt;
          Nidhin johny
      &lt;/author&gt;
  
      &lt;!-- Define the main entry-point to the application --&gt;
      &lt;www/res/icon/ios/ src="index.html" /&gt;
  
      &lt;!-- Customize your app and platform with the preference element. --&gt;
      &lt;preference name="DisallowOverscroll"         value="true" /&gt;
      &lt;!-- android: MIN SDK version supported on the target device. MAX version is blank by default. --&gt;
      &lt;preference name="android-minSdkVersion"      value="14" /&gt;
  
      &lt;!-- Define a specific version of PhoneGap to build into your app. --&gt;
      &lt;!-- &lt;preference name="phonegap-version"       value="cli-6.0.0" /&gt; --&gt;
  
      &lt;!-- Plugins --&gt;
      &lt;!-- Core plugins --&gt;
      &lt;plugin name="cordova-plugin-battery-status"      source="npm" spec="~1.1.1" /&gt;
      &lt;plugin name="cordova-plugin-camera"              source="npm" spec="~2.1.1" /&gt;
      &lt;plugin name="cordova-plugin-media-capture"       source="npm" spec="~1.2.0" /&gt;
      &lt;plugin name="cordova-plugin-console"             source="npm" spec="~1.0.2" /&gt;
      &lt;plugin name="cordova-plugin-contacts"            source="npm" spec="~2.0.1" /&gt;
      &lt;plugin name="cordova-plugin-device"              source="npm" spec="~1.1.1" /&gt;
      &lt;plugin name="cordova-plugin-device-motion"       source="npm" spec="~1.2.0" /&gt;
      &lt;plugin name="cordova-plugin-device-orientation"  source="npm" spec="~1.0.2" /&gt;
      &lt;plugin name="cordova-plugin-dialogs"             source="npm" spec="~1.2.0" /&gt;
      &lt;plugin name="cordova-plugin-file"                source="npm" spec="~4.1.1" /&gt;
      &lt;plugin name="cordova-plugin-file-transfer"       source="npm" spec="~1.5.0" /&gt;
      &lt;plugin name="cordova-plugin-geolocation"         source="npm" spec="~2.1.0" /&gt;
      &lt;plugin name="cordova-plugin-globalization"       source="npm" spec="~1.0.3" /&gt;
      &lt;plugin name="cordova-plugin-inappbrowser"        source="npm" spec="~1.3.0" /&gt;
      &lt;plugin name="cordova-plugin-media"               source="npm" spec="~2.2.0" /&gt;
      &lt;plugin name="cordova-plugin-network-information" source="npm" spec="~1.2.0" /&gt;
      &lt;plugin name="cordova-plugin-splashscreen"        source="npm" spec="~3.2.1" /&gt;
      &lt;plugin name="cordova-plugin-statusbar"           source="npm" spec="~2.1.2" /&gt;
      &lt;plugin name="cordova-plugin-vibration"           source="npm" spec="~2.1.0" /&gt;
      &lt;plugin name="cordova-plugin-whitelist"           source="npm" spec="~1.2.1" /&gt;
  
      &lt;!-- Define app icon and splashscreen for each platform. --&gt;
      &lt;icon src="icon.png" /&gt;
      &lt;platform name="android"&gt;
       &lt;icon src = "www/res/icon/android/icon-36-ldpi.png" 
        gap:platform = "android" gap:qualifier = "ldpi" /&gt;
  
     &lt;icon src = "www/res/icon/android/icon-48-mdpi.png" 
        gap:platform = "android" gap:qualifier = "mdpi" /&gt;
  
     &lt;icon src = "www/res/icon/android/icon-72-hdpi.png" 
        gap:platform = "android" gap:qualifier = "hdpi" /&gt;
  
     &lt;icon src = "www/res/icon/android/icon-96-xhdpi.png" 
        gap:platform = "android" gap:qualifier = "xhdpi" /&gt;
  
     &lt;icon src = "www/res/icon/android/icon-144-xxhdpi.png" 
        gap:platform = "android" gap:qualifier = "xxhdpi" /&gt;
  
    &lt;icon src = "www/res/icon/android/icon-192-xxxhdpi.png" 
        gap:platform = "android" gap:qualifier = "xxxhdpi" /&gt;
  
        &lt;splash src="www/res/screens/android/screen-hdpi-portrait.png"    density="hdpi" /&gt;
          &lt;splash src="www/res/screens/android/screen-ldpi-portrait.png"     density="ldpi"/&gt;
          &lt;splash src="www/res/screens/android/screen-mdpi-portrait.png"    density="mdpi" /&gt;
          &lt;splash src="www/res/screens/android/screen-xhdpi-portrait.png"    density="xhdpi" /&gt;
  
     &lt;/platform&gt;
      &lt;platform name="ios"&gt;
     &lt;icon src = "www/res/icon/ios/icon.png" gap:platform = "ios" gap:qualifier = ""/&gt;
     &lt;icon src = "www/res/icon/ios/icon.png" gap:platform = "ios" width = "57" height = "57" /&gt;
     &lt;icon src = "www/res/icon/ios/icon-72.png" gap:platform = "ios" width = "72" height = "72" /&gt;
     &lt;icon src = "www/res/icon/ios/icon-2x.png" gap:platform = "ios" width = "114" height = "114" /&gt;
     &lt;icon src = "www/res/icon/ios/icon-72-2x.png" gap:platform = "ios" width = "144" height = "144" /&gt;
          &lt;splash src="www/res/screen/ios/screen-ipad-portrait.png"     platform="ios" width="768"  height="1024" /&gt;
          &lt;splash src="www/res/screen/ios/screen-ipad-portrait-2x.png"  platform="ios" width="1536"  height="2048" /&gt;
          &lt;splash src="www/res/screen/ios/screen-iphone-portrait.png"               platform="ios" width="320" height="480" /&gt;
          &lt;splash src="www/res/screen/ios/screen-iphone-portrait-2x.png"     platform="ios" width="640" height="960" /&gt;
          &lt;splash src="www/res/screen/ios/screen-iphone-portrait-568h-2x.png"  platform="ios" width="640" height="1136" /&gt;
           &lt;splash src="www/res/screen/ios/screen-iphone-portrait-667h.png"  platform="ios" width="750" height="1334" /&gt;
            &lt;splash src="www/res/screen/ios/screen-iphone-portrait-736h.png"  platform="ios" width="1242" height="2208" /&gt;
     &lt;/platform&gt;
  
  
      &lt;!--
          Define access to external domains.
  
          &lt;access /&gt;            - a blank access tag denies access to all external resources.
          &lt;access origin="*" /&gt; - a wildcard access tag allows access to all external resource.
  
          Otherwise, you can specify specific domains:
      --&gt;
      &lt;access origin="*" /&gt;
      &lt;!--
         &lt;access origin="http://phonegap.com" /&gt;                    - allow any secure requests to http://phonegap.com/
         &lt;access origin="http://phonegap.com" subdomains="true" /&gt;  - same as above, but including subdomains, such as http://build.phonegap.com/
         &lt;access origin="http://phonegap.com" browserOnly="true" /&gt; - only allows http://phonegap.com to be opened by the child browser.
      --&gt;
  
      &lt;!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin --&gt;
      &lt;!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html --&gt;
  
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;allow-intent href="tel:*" /&gt;
      &lt;allow-intent href="sms:*" /&gt;
      &lt;allow-intent href="mailto:*" /&gt;
      &lt;allow-intent href="geo:*" /&gt;
      &lt;platform name="android"&gt;
          &lt;allow-intent href="market:*" /&gt;
      &lt;/platform&gt;
      &lt;platform name="ios"&gt;
          &lt;allow-intent href="itms:*" /&gt;
          &lt;allow-intent href="itms-apps:*" /&gt;
      &lt;/platform&gt;
  
  &lt;/widget&gt;
  </code></pre>
  
  <p>Folder of phone gap
  <a href="https://i.stack.imgur.com/9lmsC.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9lmsC.jpg" alt="enter image description here"></a></p>
  
  <p>I ALSO USE PHONEGAP CLI BUT IT IS NOT WORKING PROPERLY .also attaching screenshot below.
  <a href="https://i.stack.imgur.com/JNTqx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JNTqx.jpg" alt="enter image description here"></a></p>