What you should install
- Android SDK
(1. Download android SDK from the official website and set the path of your SDK in the .bash_profile.
- sudo nano ~/.bash_profile
- export ANDROID_HOME=/Users/myName/Documents/CordovaFolder/SDK
( 2. Install apache ant and set the path just like you did with the android SDK
- npm install -g ant (There are other ways to install ant such as “brew install ant”)
( 3. Download java JDK and set the path for your java JDK The version doesn’t have to be jdk1.8.0_91.jdk.
- JAVA_HOME =/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
( 4. Install node JS and Git from the following link. Type “node -v ” in the terminal to check if node js is installed properly. To check the Git version, type “git –version”. The version should show up. If it doesn’t the setting or the path is not set properly.
Ok, so I guess that the environment setup is ready! If so let us make the basic Cordova app with a Splash screen! Start typing the following commands in the terminal!
- “cd /Users/myName/Documents/CordovaDev/”
- “cordova create HelloProjectFolder com.mypackagename HelloMeApp”
- “cordova platform add android” ← You can add ios and for other platforms
- “cordova plugin add cordova-plugin-splash screen” ← There are many plugins so visit http://ngcordova.com/docs/plugins/ to check out more!
- “cordova build android”
After step 5, if everything is successful, the following message will show up. (In my case)
Total time: 22.093 secs
Built the following apk(s):
So what should I do after this? Well, you can open the project you made right now with android studio or do whatever you want. For more information check out the following site!