[Cordova] 在 Mac 上升級 Cordova 至 6.0 版本

[Cordova] 在 Mac 上升級 Cordova 至 6.0 版本

最近收到 Google 寄來的一封關於 Apache Cordova 弱點的信,

要求要將 Cordova 更新到 4.1.1 版本以上~

Hello Google Play Developer,

Your app(s) listed at the end of this email utilize a version of Apache Cordova, an open-source mobile development framework, that contains one or more security vulnerabilities. If you have more than 20 affected apps in your account, please check the Developer Console for a full list.

Please migrate your app(s) to Apache Cordova v.4.1.1 or higher as soon as possible and increment the version number of the upgraded APK. Beginning May 9, 2016, Google Play will block publishing of any new apps or updates that use pre-4.1.1 versions of Apache Cordova.

The vulnerabilities were addressed in Apache Cordova 4.1.1. If you’re using a 3rd party library that bundles Apache Cordova, you’ll need to upgrade it to a version that bundles Apache Cordova 4.1.1 or later.

To confirm you’ve upgraded correctly, submit the updated version to the Developer Console and check back after five hours. If the app hasn’t been correctly upgraded, we will display a warning.


不過我的好像原本就是 5.4.1 版了,不知道為啥還會收到這封信…

testuser@localhost ~ $ cordova --version
│ Update available: 6.0.0 (current: 5.4.1) │
│ Run npm install -g cordova to update.    │


用 npm 來將 Cordova 升級吧,記得要加上 sudo,不然有些要裝到 /usr/local 的東西都會失敗:

sudo npm install -g cordova


升級成功之後,再執行 cordova –version 確認一下,

如果下面還是出現要升級的提示的話,可以等一陣子後再執行 cordova –version,


testuser@localhost ~ $ cordova --version


Cordova 升級完後,就可以重新用 Cordova 編譯 APK 囉~


(本頁面已被瀏覽過 205 次)


發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料