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.
I forked a fix of a pull request I found on the repo.
I changed my package.json from
"cordova-android": "^10.1.1",
to
"cordova-android":https://github.com/fitdegree/cordova-android.git",
but now when I run 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?
CodePudding user response:
Read its guides:
After creating app as usual, link the forked android platform using:
cordova platform add --link /path/to/cordova-android
Down the forked release via this link
CodePudding user response:
cordova platform add
uses NPM behind the scenes, so any valid npm install package will work.
cordova platform add <git url>
e.g: cordova platform add https://github.com/apache/cordova-android.git
cordova platform add ../local-path
e.g: cordova platform add ../path/to/my-cordova-android-fork
cordova platform add cordova-android.tgz
Pack up the cordova-android package using npm pack
, which produces a tgz
file. Then use cordova platform add my-cordova-android.tgz