Android App Dev Quick Start with Cordova for Ubuntu
Hi! The Tutorial shows you Step-by-Step How to Getting-Started Easily with Android App Development with Apache Cordova on Ubuntu 15.10 Wily Werewolf GNU/Linux.
Cordova is an open source framework that lets you Convert HTML, JavaScript, and Cascading Style Sheets (CSS) into a Native Application that can run on iOS, Android, and other mobile platforms.
Cordova uses a Native “Wrapper” around a Web View (think of it as an embedded browser), commonly called a hybrid mobile application.
-
Open a Shell Terminal emulator
Ctrl+Alt+t on Desktop
(Press “Enter” to Execute Commands) -
How to Install the Latest Android SDK Tools on Ubuntu Linux:
Verify to Get Installed at least:
- The Android “SDK Platform” for Android API 22!
- Latest Android SDK “Platform-tools“
- Latest Android SDK “Build-tools“
-
How to Install Apache Cordova for Ubuntu
-
Creating the First, Cordova Hello-World Project
To keep everything in order first create a Target Directory to keep all Cordova Projectsmkdir ~/Documents/cordova
Change into the cordova Directory with
cd ~/Documents/cordova
Then lets go to Make the Cordova Project
cordova create myCordovaProHelloWorld
-
How to Create an Android AVD Emulator on Linux Shell
-
Adding the Android Platform into Cordova Project
First, Change into the Target Cordova Project Dircd myCordovaProHelloWorld
To Show Up all the Platforms available do
cordova platforms
The Output will show
Installed platforms: Available platforms: android, amazon-fireos, blackberry10, browser, firefoxos, ubuntu, webos
Then to Enable Just the Android one
cordova platforms add android
To Check that the Android platform was Enabled Run again
cordova platforms
This time the Output should Show Up Android Loaded into our Cordova Project
Installed platforms: android Available platforms: amazon-fireos, blackberry10, browser, firefoxos, ubuntu, webos
-
To Display a Custom Hello-World Notice.
nano www/index.html
Change
Apache Cordova
Into
Hello-World from Cordova
Ctrl+x to Save & Exit from nano Editor
-
Building and Emulating Cordova Android Hello-World.
cordova build
Or even just run the all-in-one Android Emulating process
cordova emulate
Finally, you will also receive a Visual Gratification of a job well done :)