簡體   English   中英

在OSX上運行Phonegap Android應用

[英]Running Phonegap Android app on OSX

我正在嘗試運行我制作的Phonegap應用程序的Android版本,但無濟於事。

該應用在運行時在iOS上運行良好:

phonegap run ios

但是,當我運行時:

phonegap run android

我懂了

[phonegap] executing 'cordova run android'...
[phonegap] completed 'cordova run android'`

但是什么也沒發生。 當我跑步時:

phonegap run android --verbose

我收到錯誤:

BUILD FAILED
/usr/local/Cellar/android-sdk/24.1.2/tools/ant/build.xml:601: The following error occurred while executing this line:
/usr/local/Cellar/android-sdk/24.1.2/tools/ant/build.xml:653: The following error occurred while executing this line:
/usr/local/Cellar/android-sdk/24.1.2/tools/ant/build.xml:698: null returned: 1

ERROR running one or more of the platforms: Error: /Users/*/Google Drive/Websites/angular-phonegap/*/platforms/android/cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project

過去,我遇到過類似的問題,涉及編輯PATH變量,不確定是相同的問題還是什么。 無論如何,我們將不勝感激。

謝謝

我認為您沒有所有要求,請再次檢查,正如您在此處看到的那樣,cordova失敗並出現此錯誤,因為找不到要運行的特定平台命令。 請遵循以下指示:

  1. 檢查java sdk是否已安裝並且已經在您的Path中。
  2. 檢查是否已獨立安裝android studio或sdk,並且sdk的bin文件夾位於Path中。
  3. 檢查是否已安裝了ant(在Mac上與brew一起安裝,這是最好的選擇)並使其在路徑中。

有關要檢查的完整列表,請參閱此cordova文檔

請耐心並一步一步地執行操作,您的問題必須出在以下步驟之一。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM