1. PhoneGap Desktop application.
This will let you easily transfer the application to the mobile device without necessity to compile the application on host computer and transfer the .apk file (in case of Android device).
Install the PhoneGap Desktop application as described here. Download the installer and run it.
2. PhoneGap CLI
Prerequisite is node.js. Download it and install. I will use the latest version, but LTS is always safer. Note, that on different versions of Windows node.js behaves differently. On Windows8 I recall I got a separate console for Node.js. On Windows7 it can be run from a normal Windows console (type cmd in the command search).
Now from console run the following command:
npm install -g phonegap@latest
From now on we can use phonegap command from the command line.
3. Android SDK manager
On windows this comes as a part of Android Studio, though it’s possible to install it separately: http://developer.android.com/sdk/installing/index.html
I will download Android Studio: http://developer.android.com/sdk/index.html and call SDK Manager from the toolbar.
I store my code on Github, so I’ll need Git.
Download the installer here and run it.
When the installer asks about the PATH modification, I prefer to choose the option to allow git to run from command line (third option on the picture below):
I just have installed git under Windows and what I want to say: this was probably the most perfect program installer I’ve ever seen.
Usually I have to check if the program didn’t check unnecessary checkboxes and whether it doesn’t try to install some additional crapware. In best cases you just click through without modifying checkboxes.
In case of git I even had to decrease the ‘safety level’ of some options. I just see that this was made with love to users and that creators really thought what people need from their program and how they’re going to use it.
With love to git.
Few times already in the past couple years I tried doing some development for Android, but most of the time I decided to postpone that for another piece of undefined time.
The reason was that I always had issues with setting up the virtual device for debugging. And without debugging there is no development.
So, what was the problem? I always used a VirtualBox machine for development, having Windows as host and Ubuntu as guest. But to run AVD (Android Virtual Device), Linux uses KVM infrastructure; and according to StackOverflow, KVM can’t be run together with VirtualBox.
Although, KVM can be emulated, but then AVD is extremely slow (which I observed on the previous computer).
Solution? I pulled from the shelf one of my old Android phones (not to kill the tablet accidentally) and configured it to be a debugging device instead of AVD. Bingo 🙂
I have recently bought a desktop PC with Windows 8 on-board, and one of the first programs I installed was Virtualbox.
But unfortunately I’ve got a famous error ‘VirtualBox – Error in supR3HardenedWinReSpawn’ when running any virtual machine. In my case it was NtCreateFile error.
Forums said that the error was introduced somewhere at version 4.3.14 and had to be fixed in later builds (current build is 4.3.28), but in the latest version I still observe the error.
Solution that worked for for me was uninstalling Windows update KB3045999 (to do that, go to Control Panel -> Installed Updates, find patch KB3045999, right click it, choose Uninstall).
Unfortunately, after some time Windows installed the update again, so I had to turn the automatic updates off.
What I tried and what did NOT help:
- Playing with VirtualBox settings.
- Downgrading to VirtualBox 4.2.* where some security features are not present yet.
Hope this helps someone.
Even better solution would be to use Linux 🙂