[英]How to use a forked version of cordova-android
There's a problem with the current version of cordova-android that doesn't allow you to have a "&" symbol in the name of your app.当前版本的 cordova-android 存在一个问题,不允许您在应用名称中使用“&”符号。
I forked a fix of a pull request I found on the repo.我分叉了我在回购协议中找到的拉取请求的修复程序。
I changed my package.json from我把我的 package.json 从
"cordova-android": "^10.1.1",
to到
"cordova-android":https://github.com/fitdegree/cordova-android.git",
but now when I run cordova platform add android
但现在当我运行
cordova platform add android
I get the following error message:我收到以下错误消息:
cordova platform add android
Using cordova-fetch for cordova-android@https://github.com/fitdegree/cordova-android.git
Failed to fetch platform cordova-android@https://github.com/fitdegree/cordova-android.git
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
CordovaError: Error: npm: Command failed with exit code 127 Error output:
any ideas on how I can use my forked version?关于如何使用我的分叉版本的任何想法?
cordova platform add
uses NPM behind the scenes, so any valid npm install package will work. cordova platform add
在幕后使用 NPM,因此任何有效的 npm 安装 package 都可以使用。
eg: cordova platform add https://github.com/apache/cordova-android.git
例如:
cordova platform add https://github.com/apache/cordova-android.git
eg: cordova platform add../path/to/my-cordova-android-fork
例如:
cordova platform add../path/to/my-cordova-android-fork
Pack up the cordova-android package using npm pack
, which produces a tgz
file.使用
npm pack
cordova-android package,生成一个tgz
文件。 Then use cordova platform add my-cordova-android.tgz
然后使用
cordova platform add my-cordova-android.tgz
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.