2013-10-19 122 views
5

我正在嘗試開發Phonegap應用程序(Android/IOS)。如何使用Phonegap CLI創建/構建本地應用程序

我已經在Phonegap Build中創建了1個私人應用程序。所以現在我得到一個錯誤說

[phonegap] detecting Android SDK environment... 
[phonegap] using the remote environment 
[phonegap] compressing the app... 
[phonegap] uploading the app... 
[error] {"error":"Private app limit reached"} 

如何使用Phonegap CLI創建公共應用程序。

回答

9

下面是解決方案。它可能會幫助其他人。

我們不必創建公共應用程序。創建一個應用程序並在本地構建。爲了在本地構建應用程序使用CLI,請使用以下命令

>phonegap local build android 
[phonegap] adding the Android platform... 
[phonegap] compiling Android... 
[phonegap] successfully compiled Android app 
+0

如果您使用NodeJS和Windows 7安裝phonegap,您可以通過** C:\ Users \ * \ AppData \ Roaming \ npm \ phonegap.cmd ** – fedmich

+0

@rahmathullah找到phonegap,我收到此錯誤「The provided path」/ Users/*****/PhoneGapApplications/cardInfo/platforms/android「不是Android項目。」請幫我用這個 –

+0

@CharanGiri:你不必去'platforms/android'路徑。只需從您的項目基礎文件夾執行此命令。即; ''/ Users/*****/PhoneGapApplications/cardInfo /' –

0

Phonegap Build允許你有1個私人應用程序。爲了擁有更多的私人應用程序,您需要爲服務計劃付費。但是,您可以擁有多個公共應用程序。要擁有一個公共應用程序,您需要在Github中託管您的代碼。一旦它在那裏,您可以在「開源」選項卡上創建一個公共應用here

+1

是否有可能做到這一點使用Phonegap CLI? –

+0

據我所知,沒有。因爲所有的代碼都是本地的,即使你試圖遠程構建它,你的代碼仍然是私有的。 – Dom

3

命令phonegap local <command>已棄用

相反,請嘗試以下命令「科爾多瓦構建Android」

相關問題