For the most part, Node and NPM are going to be used extensively for Ionic and Cordova. You can use the installer from the Node website or various package managers.
Once installed, you should have access to both
npm from your command line.
You’ll want to install Xcode from Apple. You can either do this from the Mac App store or from Apple’s Developer portal. The Mac App store is the easiest approach. Once Xcode is installed, you’ll have Xcode, the iOS SDK, Xcode command line tools, and all the build tools to output a native app.
You’ll need to download and install Java from their website.
Download Android Studio and go through the installer and set up the IDE. It should print out a location for where the Android SDK gets installed. Copy this down for future use.
Next, inside the new
SDK location, we’ll run
tools/android to open the Android SDK Manager. We’ll want to install:
- Android Platform SDK for your targeted version of Android
- Android Platform-Tools
- Android SDK build-tools version 19.1.0 or higher
- Android Support Repository (found under “Extras”)
Accept the license and let the packages install.
If you install the Android SDK without ANdroid Studio you have to install Gradle seperatly. Download Gradle from the offical Gradle website
Now that everything’s installed, we’ll need to set some environment variables for our command line. Open your terminal and enter the following:
Then open that file in your favorite editor.
# Opens with TextEdit
open -a TextEdit ~/.bash_profile
From here, we’ll need to add a few lines. These are the reference to Java and the Android SDK location we copied down earlier.
If you’ve used the paths suggested, you should have something like this.
# Create a JAVA_HOME variable, determined dynamically
# Add that to the global PATH variable
# Set Android_HOME
# Add the Android SDK to the ANDROID_HOME variable
Apply these changes by re-sourcing .bash_profile
From here, we can quit the terminal and then start it back up again. If there are no errors, you should be able to run
# check java version
# start android SDK manager
Now, you should be able to create and build an Android project from the command line.