2017-01-26 138 views
0

如何在我的cordova項目中添加插件CorHttpd? 什麼是命令?科爾多瓦版本6.4.0 - 如何安裝httpd插件?

https://github.com/floatinghotpot/cordova-httpd在這個環節上,他們說:

How to use CorHttpd:

Add the plugin to your cordova project:

我想:

cordova plugin add https://github.com/floatinghotpot/cordova-httpd.git 

,但這個命令是行不通的。我運行這個命令後,我得到了這條消息:

Error: Failed to fetch plugin https://github.com/floatinghotpot/cordova-httpd.gi t via git. Either there is a connection problems, or plugin spec is incorrect: Error: "git" command line tool is not installed: make sure it is accessi ble on your PATH.

需要關於這件事情的幫助。

回答

0

你需要添加所有的git子包。請運行:

sudo apt-get install git-all 

,然後安裝插件:

cordova plugin add https://github.com/floatinghotpot/cordova-httpd.git 
0

您必須安裝的git:

在Windows上:(GIT命令必須在PATH環境變量)

Download here

在linux/mac上:

sudo apt-get install git-all