2016-04-05 14 views
-1

我是新來的科爾多瓦,所以我檢查了官方文檔,我爲他們的所有指令mentoins,但卡在一個地方 我想從CMD創建演示項目我在哪裏得到的樣品項目在科爾多瓦5.0.0

須藤NPM安裝-g科爾多瓦

科爾多瓦創建Hello輸入com.example.hello的HelloWorld

CD打招呼。

cordova platform add android。

此後沒有任何事情發生只顯示此消息 排除所有插件的「before_plaform_add」鉤子。 沒有版本spplied.Retreving從config.xml版本..

所以我遇到麻煩與啓動cordova是他們的任何方式找到找到cordova5.0.0.jar,cordova.js和config.xml。

回答

0

是否安裝了所有其他依賴項?除了

npm install -g cordova 

你還需要安裝平臺的SDK爲您構建的每個平臺,您可能需要安裝Java以及取決於你是否正在構建Android和已經存在於您的機器上有什麼。您需要Xcode(並使用Mac)才能爲iOS構建。

關於安裝過程的正式科爾多瓦文檔是here。我會強烈建議不要用科爾多瓦5打算,除非你有,而是採用了最新的6.1.1科爾多瓦,您可以用得到:

npm install -g [email protected] 

然後驗證它:

cordova --version 

應該返回6.1。 1在寫作時。

然後嘗試:

cordova create hello com.example.hello HelloWorld 
cd hello 
cordova platform add ios android 
cordova requirements 

最後一個命令「科爾多瓦要求」應該告訴你,如果安裝了一切,科爾多瓦的需要。例如在我的系統上:

cordova requirements 

Requirements check results for android: 
Java JDK: installed . 
Android SDK: installed 
Android target: installed android-17,android-18,android-19,android-20,android-21,android-22,android-23,Google Inc.:Google APIs:17,Google Inc.:Google APIs:18,Google Inc.:Glass Development Kit Preview:19,Google Inc.:Google APIs:19,Google Inc.:Google APIs (x86 System Image):19,Google Inc.:Google APIs:21,Google Inc.:Google APIs:22,Google Inc.:Google APIs:23 
Gradle: installed 

Requirements check results for ios: 
Apple OS X: installed darwin 
Xcode: installed 7.2 
ios-deploy: not installed 
ios-deploy was not found. Please download, build and install version 1.8.3 or greater from https://github.com/phonegap/ios-deploy into your path, or do 'npm install -g ios-deploy'