android - Phonegap errors everywhere -


i'm trying started building sample mobile app phonegap

i've installed needed.

when run phonegap create creates lot of files haven't seen in tutorials yet.

i'm using version 5.3.5

i've installed using sudo npm install -g phonegap

what i've done

i have uploaded sample app github , build .git link.

when downloaded .apk android using qr code scanner installed , able connect device ready appeared.

but when try debug there no targets.

when enabled hydration , re-build, app updates no longer connects device.connecting device appears , doesn't leave screen.

the changes i've done config.xml file add source plugins

<gap:plugin name="org.apache.cordova.battery-status" source="npm"/> <gap:plugin name="org.apache.cordova.camera" source="npm"/> <gap:plugin name="org.apache.cordova.media-capture" source="npm"/> <gap:plugin name="org.apache.cordova.console" source="npm"/> <gap:plugin name="org.apache.cordova.contacts" source="npm"/> <gap:plugin name="org.apache.cordova.device" source="npm"/> <gap:plugin name="org.apache.cordova.device-motion" source="npm"/> <gap:plugin name="org.apache.cordova.device-orientation" source="npm"/> <gap:plugin name="org.apache.cordova.dialogs" source="npm"/> <gap:plugin name="org.apache.cordova.file" source="npm"/> <gap:plugin name="org.apache.cordova.file-transfer" source="npm"/> <gap:plugin name="org.apache.cordova.geolocation" source="npm"/> <gap:plugin name="org.apache.cordova.globalization" source="npm"/> <gap:plugin name="org.apache.cordova.inappbrowser" source="npm"/> <gap:plugin name="org.apache.cordova.media" source="npm"/> <gap:plugin name="org.apache.cordova.network-information" source="npm"/> <gap:plugin name="org.apache.cordova.splashscreen" source="npm"/> <gap:plugin name="org.apache.cordova.vibration" source="npm"/> 

i added source="npm" in order fix errors.

this index.html file creates:

<!doctype html> <!--     copyright (c) 2012-2014 adobe systems incorporated. rights reserved.      licensed apache software foundation (asf) under 1     or more contributor license agreements.  see notice file     distributed work additional information     regarding copyright ownership.  asf licenses file     under apache license, version 2.0 (the     "license"); may not use file except in compliance     license.  may obtain copy of license @      http://www.apache.org/licenses/license-2.0      unless required applicable law or agreed in writing,     software distributed under license distributed on     "as is" basis, without warranties or conditions of      kind, either express or implied.  see license     specific language governing permissions , limitations     under license. --> <html>     <head>         <meta charset="utf-8" />         <meta name="format-detection" content="telephone=no" />         <meta name="msapplication-tap-highlight" content="no" />         <!-- warning: ios 7, remove width=device-width , height=device-height attributes. see https://issues.apache.org/jira/browse/cb-4323 -->         <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />         <link rel="stylesheet" type="text/css" href="css/index.css" />         <title>hello world</title>     </head>     <body>         <div class="app">             <h1>phonegap</h1>             <div id="deviceready" class="blink">                 <p class="event listening">connecting device</p>                 <p class="event received">device ready</p>             </div>         </div>         <script type="text/javascript" src="cordova.js"></script>         <script type="text/javascript" src="js/index.js"></script>         <script type="text/javascript">             app.initialize();         </script>     </body> </html> 

but i'm pretty confuse why cordova.js file imported instead of phonegap.js file i've seen in every tutorial.

also, creates bunch of folders:

--hooks --platforms --plugins --www config.xml 

i'm connected in same wifi laptop , android device.

what doing wrong?


Comments