So you have a superb idea but don’t know where to start.But don’t worry, there is thousands of tutorials available on internet.You just need to know ‘how to google’! So let us begin with a simple application where you can learn the basics of android development.Creating an Android app requires the SDK (Software Development Kit), an IDE (Integrated Development Environment) like Android Studio or Eclipse, the Java Software Development Kit (JDK) and a virtual/real device to test on.You don’t need to be an expert in coding to become an android developer.But you just need to know the basics of java to become an android developer.
STEP 1: Download Android Studio
Firstly we need an IDE(Integrated development environments).This program typically provides many features for authoring, modifying, compiling, deploying and debugging software.The most common IDE for Android development is Android Studio, which comes direct from Google itself. You can get it here
Android Studio
Android studio is an IDE specially designed for android development.It also contains Android Virtual Device,which is an emulator where you can test your application without the need of an android device.Based on JetBrains’ IntelliJ IDEA software, Android Studio is designed specifically for Android development.It is available for download on Windows, macOS and Linux and replaced Eclipse Android Development Tools (ADT) as Google’s primary IDE for native Android application development
STEP 2: Setting Up Android Studio
Now you have Android Studio installed you’ve taken your first step towards becoming a developer! you also need to install Java on your machine to use Android Studio. Specifically, you’re going to need install the Java Development Kit (JDK). Java is the programming language you’re going to be using to build your apps in this instance and you need to install the JDK in order for Android Studio to be able to interpret and compile your code . You’ll find the Java Development Kit here.
Just download and follow the instructions to install.Now you can click on Android Studio to launch it. Once it opens up, you’ll be presented with a menu where you’ll be able to get started or configure some options. The great thing is that everything is handled for you at this point, though you may want to familiarize yourself with the SDK Manager (Configure > SDK Manager) which is where you’ll update your Android SDK to support newer versions, as well as download things like code samples or support for Google Glass. But don’t worry about that now but if Android Studio says you’re missing something, this is where you’ll probably need to go to find it.
So really there are three main things interacting when you use Android Studio to create your apps.Android Studio itself, which is an IDE that provides you with a nice interface for coding.The code you write in Java, which you installed a moment ago… And the Android SDK which you’ll access through your Java code in order to do Android-type thingsIf you find this all a bit complicated and daunting then… well, you don’t know you’re born. This used to be way worse.
STEP 3: Starting a New Project
Once you’ve installed your samples, you can go back to the first page you saw when you loaded up Android Studio. Now you want to choose Start a new Android Studio Project – it’s finally happening!
Enter the name you want for your application and your ‘company domain’. Together these elements will be used to create your package name with the following format:
com.companyname.appname
The package will be the compiled file or APK (‘Android Package File’) that you’ll upload to the Google Play Store.
Choosing package name
The last field to enter is the directory where you want to save all the files pertaining to your app.Next you need to decide what type of device you’re going to be developing for and in this case we’ll start with the Phone and Tablet option. Other options are TV, Wear and Glass. It’s fine if you want to develop for a myriad of platforms in the future – that’s one of the wonders of Android – but let’s start with something a bit more straightforward to begin with, okay?
The other choice you have to make at this stage is the ‘Minimum SDK’. This is the lowest version of Android you want to support. Why not just enter the latest version of Android in here? Well, because relatively few people actually have the latest version of Android installed on their device at any given time. You want to support phones that are still running older versions in order to reach the largest possible audience – especially overseas.Why not just go with Android 1.1? Well, apart from this not being an option (Froyo is as low as you can go), that would also prevent you from using any of the fancy new features from the latest updates.
Fill up the fields and click next

Choosing Activity
Now its the time to choose an Activity to your application.As beginner let us choose the 'Blank Activity' and click 'next'Now you get to pick the name for your activity and the layout name (if you chose ‘Basic Activity’ you’ll also have the title option and the ‘menu_resource’ name). The activity name is how you’ll refer to your activities in your code, like ‘MainActivity’.The layout name meanwhile describes a file that determines the layout of an activity. This is a separate piece of code that runs in concert with the main activity code to define where elements like images and menus go and what fonts you’ll use.This is actually not Java but XML (Extensible Markup Language)
Click 'finish' and your 'Helloworld' app is ready
STEP 4: Say Hello to your first application
Once your app opens, you should see a directory tree on the left with all the different files and folders that make up your app and a picture of a phone displaying ‘Hello World!’ in the center.

Click on' run' to launch the application on emulator or connect an android device through USB cable .

So finally say hello to your first android application! So you finished your first step toward android development.Cheers!
See our next post Anatomy of an android app project


No comments:
Post a Comment