-1

i have a source code of a mobile application written using phonegap and i want to build it to the Android (APK) and IOS versions, the source code is larger than that using phone gap online build service or XDK online build service so i tried to install phonegap and build my application using eclipse for android and xcode for ios.

i already have JDK, Android studio and i also configured all the needed configuration for JAVA, Android, Git in System Variable path key.

When i using command line to install phone gap like this "npm install -g phonegap" i have a lot of warnings and errors:

C:\Users\ahmed.marzouk>npm install -g phonegap
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config -
-get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:751:12)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:110:17)
npm WARN addRemoteGit     at maybeClose (child_process.js:1015:16)
npm WARN addRemoteGit     at Socket.<anonymous> (child_process.js:1183:11)
npm WARN addRemoteGit     at Socket.emit (events.js:107:17)
npm WARN addRemoteGit     at Pipe.close (net.js:485:12)
npm WARN addRemoteGit  git+https://github.com/filmaj/node-plist.git resetting re
mote C:\Users\ahmed.marzouk\AppData\Roaming\npm-cache\_git-remotes\https-github-
com-filmaj-node-plist-git-653fe22e because of error: { [Error: Command failed: g
it -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit ]
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.ori
gin.url' }
npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config -
-get remote.origin.url
npm WARN addRemoteGit
npm WARN addRemoteGit     at ChildProcess.exithandler (child_process.js:751:12)
npm WARN addRemoteGit     at ChildProcess.emit (events.js:110:17)
npm WARN addRemoteGit     at maybeClose (child_process.js:1015:16)
npm WARN addRemoteGit     at Socket.<anonymous> (child_process.js:1183:11)
npm WARN addRemoteGit     at Socket.emit (events.js:107:17)
npm WARN addRemoteGit     at Pipe.close (net.js:485:12)
npm WARN addRemoteGit  git+https://github.com/imhotep/plugman.git#0.5.7 resettin
g remote C:\Users\ahmed.marzouk\AppData\Roaming\npm-cache\_git-remotes\https-git
hub-com-imhotep-plugman-git-20c32d58 because of error: { [Error: Command failed:
 git -c core.longpaths=true config --get remote.origin.url
npm WARN addRemoteGit ]
npm WARN addRemoteGit   killed: false,
npm WARN addRemoteGit   code: 1,
npm WARN addRemoteGit   signal: null,
npm WARN addRemoteGit   cmd: 'git -c core.longpaths=true config --get remote.ori
gin.url' }
npm WARN engine ncallbacks@1.0.0: wanted: {"node":"~0.6.7"} (current: {"node":"0
.12.5","npm":"2.11.2"})
-
> cordova@2.7.4 install C:\Users\ahmed.marzouk\AppData\Roaming\npm\node_modules\
phonegap\node_modules\cordova
> node bootstrap.js

SUCCESS: Minimum requirements for blackberry met.
BOOTSTRAPPING blackberry...
WARNING: Your system does not meet requirements to create wp7 projects. See erro
r output below.
'C:\Users\ahmed.marzouk\AppData\Roaming\npm\node_modules\phonegap\node_modules\c
ordova\lib\cordova-wp7\bin\check_reqs' is not recognized as an internal or exter
nal command,
operable program or batch file.

SKIPPING wp7 bootstrap.
WARNING: Your system does not meet requirements to create ios projects. See erro
r output below.
Xcode is (probably) not installed, specifically the command `xcodebuild` is unav
ailable or erroring out. Output of `xcodebuild -version` is: 'xcodebuild' is not
 recognized as an internal or external command,
operable program or batch file.

SKIPPING ios bootstrap.
WARNING: Your system does not meet requirements to create wp8 projects. See erro
r output below.
'C:\Users\ahmed.marzouk\AppData\Roaming\npm\node_modules\phonegap\node_modules\c
ordova\lib\cordova-wp7\bin\check_reqs' is not recognized as an internal or exter
nal command,
operable program or batch file.

SKIPPING wp8 bootstrap.
ERROR! Could not create a native blackberry project test fixture. See below for
error output.
Missing one of the following:
JDK: http://java.oracle.com
Apache ant: http://ant.apache.org

WARNING: Your system does not meet requirements to create android projects. See
error output below.
Please install Android target 17 (the Android 4.2 SDK). Make sure you have the l
atest Android tools installed as well. Run `android` from your command-line to i
nstall/update any missing SDKs or tools.
SKIPPING android bootstrap.
C:\Users\ahmed.marzouk\AppData\Roaming\npm\phonegap -> C:\Users\ahmed.marzouk\Ap
pData\Roaming\npm\node_modules\phonegap\bin\phonegap.js
phonegap@0.9.4 C:\Users\ahmed.marzouk\AppData\Roaming\npm\node_modules\phonegap
├── colors@0.6.2
├── semver@1.1.0
├── qrcode-terminal@0.9.5
├── shelljs@0.0.9
├── optimist@0.3.7 (wordwrap@0.0.3)
├── node-static@0.6.9 (mime@1.3.4)
├── phonegap-build@0.8.0 (qrcode-terminal@0.8.0, phonegap-build-api@0.3.3)
├── prompt@0.2.14 (pkginfo@0.3.0, revalidator@0.1.8, read@1.0.6, winston@0.8.3,
utile@0.2.1)
└── cordova@2.7.4 (ncallbacks@1.0.0, open@0.0.3, shelljs@0.1.2, elementtree@0.1.
3, request@2.11.4, xcode@0.5.1, prompt@0.2.7, plist@0.4.0, express@3.0.6, ripple
-emulator@0.9.29, plugman@0.5.6)

I need to know, is the phonegap installing correctly or not? and if not, how can i solve this issue?

Thanks

Michael
  • 10,124
  • 1
  • 34
  • 49
Marzouk
  • 2,650
  • 3
  • 25
  • 56
  • 1
    Lots of warnings... Run `phonegap --version` and see if it spits out anything. This line here also looks like bad news: `Your system does not meet requirements to create android projects.` One last thing to keep in mind, your version of cordova is pretty old `cordova@2.7.4` – laughingpine Jun 24 '15 at 23:05
  • @laughingpine i found the solution, kindly check my solution below :) – Marzouk Jun 24 '15 at 23:06

1 Answers1

1

I found the solution. First thing if you have any issue in git like 'git path not found' you should follow the instructions here: installing-git-in-path. To solve the above problem you should:

  1. first run your cmd as admin it will solve half of the problem.
  2. If there are any issue related toAndroid SDK like

    WARNING: Your system does not meet requirements to create android projects. See error output below. Please install Android target 17 (the Android 4.2 SDK).

in cmd >

android

then check Android 4.2 SDK and install it.

Thanks

Community
  • 1
  • 1
Marzouk
  • 2,650
  • 3
  • 25
  • 56