Chapter 2. Installing Cordova and the Android SDK
This chapter covers
- What mobile SDKs are and why you need them
- How to install the Android SDK and other prerequisites
- How to install Cordova
- How to create your first Cordova project
In chapter 1 you read how wonderful Cordova is because it lets you build mobile applications without having to learn how to develop natively. While that’s true, there are a few prerequisites you’ll need to set up before Cordova can wield its magic touch. Mobile software development kits (SDKs) are how native developers work with their platform of choice. Apple, Google, Microsoft, and other device manufacturers provide an SDK so that developers can create applications for their platform. Some are free. Some require registration. Some work on one platform but not on others. At the end of the day, the SDK is required to get your creation onto the device (or emulator) of your choice.
Checklist
This chapter walks you through the prerequisites for installing the Android SDK and the Cordova command-line interface (CLI). There’s a good chance you may have some, or even all, of them already. Here’s a short list that you can check. If you have everything covered, skip down to the “Installing Cordova” section.
Android SDK
Java
Apache Ant
Git
Node.js
At a high level, Cordova has three basic requirements, as shown in figure 2.1. This chapter will detail these requirements and walk you through setting them up.