1

I've written a (canvas) game in HTML5 and I'm now ready to package it for Android (and iOS at a later stage). I've looked at a few options and came to the conclusion Cordova is the way to go. I installed Cordova and was able to create an Android APK that I could test on the emulator and my Android device.

Much to my surprise, it was terribly slow, even though the original HTML5 game ran perfectly in a browser on both the emulator and the Android device. I then stumbled upon the FastCanvas plugin but I don't really understand how to install it. The Git page tells me to install the plugin using plugman:

plugman --platform android --project <your project folder> --plugin https://github.com/FastCanvas/FastCanvas.git

That doesn't work. It simply displays the help file.

Then on another page, it said I can install FastCanvas as follows:

cordova plugin add https://github.com/phonegap/phonegap-plugin-fast-canvas.git

That doesn't work either. If I try that, I get an error message:

(node:28600) UnhandledPromiseRejectionWarning: CordovaError: Failed to fetch
plugin https://github.com/phonegap/phonegap-plugin-fast-canvas.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.

So I'm at a loss now. How do I install FastCanvas?

BTW, I'm on a Windows 10 machine, Cordova version is 8.0.0

UPDATE AUG 10 2018:

Apparently, the initial error was caused by not having installed Git on my computer. I now installed Git and I still get an error, but a different one:

(node:25356) UnhandledPromiseRejectionWarning: CordovaError: Failed to fetch
plugin https://github.com/phonegap/phonegap-plugin-fast-canvas.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 1 Error output:
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json:
git+https://github.com/phonegap/phonegap-plugin-fast-canvas.git.
npm ERR! package.json npm can't find a package.json file in your current directory.

Still no idea what is causing this.

Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
Zippy1970
  • 601
  • 6
  • 20
  • https://stackoverflow.com/questions/35942228/cordova-plugins-manual-installation - you can manually install a cordova plugin. I might also just try to do a brand new blank phonegap app and then manually install the fast canvas on a blank phonegap install and see how that works – Usman Shahid Aug 10 '18 at 05:08
  • Trying to install the plugin on a blank cordova project gives me the same problem. – Zippy1970 Aug 10 '18 at 09:05
  • So as you've just installed git on the computer, maybe it's not working? Are you behind a proxy? – QuickFix Aug 10 '18 at 13:29
  • I've done some more testing and got different results. If I keep editing my original question, I'm afraid it becomes a bit chaotic. Is it alright to simply delete this question and create a new? – Zippy1970 Aug 10 '18 at 14:54
  • not sure what the etiquette is on deleting vs. opening a new one. seems like node is messing up now. Is phonegap or cordova CLI installed correctly? Googled it and found some stuff - https://github.com/npm/npm/issues/17821 - when I have issues with the cordova CLI I manually install the plugins I want in a blank folder from scratch and it works out better for me. Not sure if thats helpful – Usman Shahid Aug 10 '18 at 18:27

1 Answers1

1

Apparently, FastCanvas is old and deprecated and there's no way getting that to work with the current version of Cordova/PhoneGap. Well, if there is, I wasn't able to find it after searching for almost 16 hours on the interwebs.

Zippy1970
  • 601
  • 6
  • 20