title: sencha touch with phonegap (using sencha cmd and phonegap build) causes Error : LocalFileSystem not defined
body: <p>I followed these sencha cmd guide to produce a phoneGap based sencha touch 2 project:
  Using Latest Sencha Cmd v4.0.2.67 , Latest sencha touch 2.3.1 , phoneGap ver- 3.1.0</p>
  
  <p><strong>1)</strong> Make a sencha touch 2 project by :</p>
  
  <pre><code>sencha -sdk /path/to/sencha-touch-sdk generate app MyApp /path/to/www/myapp
  </code></pre>
  
  <p><strong>2)</strong> Add phoneGap to the above project</p>
  
  <pre><code>sencha phonegap init
  </code></pre>
  
  <p><strong>3)</strong> configure the phonegap.local.properties</p>
  
  <pre><code>phonegap.platform=android
  phonegap.build.remote=true
  phonegap.build.remote.username=myUseName
  phonegap.build.remote.password=myPassword
  </code></pre>
  
  <p><strong>4)</strong> Updated the config.xml by adding all the core plugins</p>
  
  <pre><code>&lt;!-- Core plugins --&gt;
      &lt;gap:plugin name="org.apache.cordova.battery-status" /&gt;
      &lt;gap:plugin name="org.apache.cordova.camera" /&gt;
      &lt;gap:plugin name="org.apache.cordova.media-capture" /&gt;
      &lt;gap:plugin name="org.apache.cordova.console" /&gt;
      &lt;gap:plugin name="org.apache.cordova.contacts" /&gt;
      &lt;gap:plugin name="org.apache.cordova.device" /&gt;
      &lt;gap:plugin name="org.apache.cordova.device-motion" /&gt;
      &lt;gap:plugin name="org.apache.cordova.device-orientation" /&gt;
      &lt;gap:plugin name="org.apache.cordova.dialogs" /&gt;
      &lt;gap:plugin name="org.apache.cordova.file" /&gt;
      &lt;gap:plugin name="org.apache.cordova.file-transfer" /&gt;
      &lt;gap:plugin name="org.apache.cordova.geolocation" /&gt;
      &lt;gap:plugin name="org.apache.cordova.globalization" /&gt;
      &lt;gap:plugin name="org.apache.cordova.inappbrowser" /&gt;
      &lt;gap:plugin name="org.apache.cordova.media" /&gt;
      &lt;gap:plugin name="org.apache.cordova.network-information" /&gt;
      &lt;gap:plugin name="org.apache.cordova.splashscreen" /&gt;
      &lt;gap:plugin name="org.apache.cordova.vibration" /&gt;
  </code></pre>
  
  <p>and removed the <code>&lt;preference name="permissions" value="none"/&gt;</code> permission config</p>
  
  <p><strong>5)</strong> Created a external js file named dirReader.js and included its path in app.json</p>
  
  <p><strong>dirReader.js Contents</strong></p>
  
  <pre><code>window.onerror=function(msg, url, linenumber){
       alert('Error message: '+msg+'\nURL: '+url+'\nLine Number: '+linenumber)
       return true
      }
  
  var dirList = [{name: 'Chart 1'},{name: 'Chart 2'}];
   // Wait for device API libraries to load
      //
      document.addEventListener("deviceready", onDeviceReady, false);
  
      // device APIs are available
      //
      function onDeviceReady() {
          alert("device ready");
              Ext.device.FileSystem.requestFileSystem(
                  LocalFileSystem.PERSISTENT, 0, function(fs) {   // LocalFileSystem not defined error here
                  alert("Root = " + fs.root.fullPath);
                  var directoryReader = fs.root.createReader();
                  directoryReader.readEntries(function(entries) {
                  var i;
                  for (i=0; i&lt;entries.length; i++) {
                      //alert(entries[i].name);
                      var itemObj = {};
                          itemObj.name = entries[i].name;
                      dirList.push(itemObj);
                  }
                  var dirListString = JSON.stringify(dirList);
                  alert(dirListString);
                  }, function (error) {
                  alert(error.code);
                  })
                  }, function (error) {
                  alert(error.code);
              });
      }
  </code></pre>
  
  <p><strong>6)</strong> Added <code>'Ext.device.FileSystem'</code> in requires under app.js        </p>
  
  <p><strong>7)</strong> Finally ran <code>sencha app build native</code>
      This causes many mumbo jumbo to take place in the command prompt (No Errors) . the app is compressed and uploaded to build.phonegap for android build. Build succeeds.</p>
  
  <p><strong>----------------------------------------------------------------------------------------</strong></p>
  
  <p><strong>PROBLEM</strong> </p>
  
  <p>The app installs and starts fine.
  I receive the "Device Ready" alert from the dirReader.js file.
  The next error I get is that <code>LocalFileSystem is undefined</code> in dirReader.js.</p>
  
  <p>I tried lots of things but nothing works.</p>
  
  <p>I checked that the built apk contains the plugins folder with all the plugins including the <code>org.apache.cordova.file</code> . Also , the cordova_plugins.js is present and has the <code>window.LocalFileSystem</code> entry.</p>