Introduction:
Welcome to Android application development!
Here i am going to teach to you how to build your first Android app in Android Studio.
Here i am going to teach to you how to build your first Android app in Android Studio.
Development Environment:
Before you start this class, be sure you have your development environment set up. You need to:
- Download Android Studio.
- Download the latest SDK tools and platforms using the SDK Manager.
Create New Project:
An Android project contains all the files that comprise the source code for your Android app.
This lesson shows how to create a new project using Android Studio.
Steps:
- In Android Studio, create a new project:
- If you don't have a project opened, in the Welcome screen, click New Project.
- If you have a project opened, from the File menu, select New Project.
- Under Configure your new project, follow below steps.
- Application Name is the app name that appears to users. For this project, use "My First App."
- Company domain provides a qualifier that will be appended to the package name; Android Studio will remember this qualifier for each new project you create.
- Package name is the fully qualified name for the project. Your package name must be unique across all packages installed on the Android system. You can Edit this value independently from the application name or the company domain.
- Project location is the directory on your system that holds the project files.
3. Under Select the form factors your app will run on, check the box for Phone and Tablet.
4. For Minimum SDK, select API 8: Android 2.2 (Froyo).
The Minimum Required SDK is the earliest version of Android that your app supports, indicated using the API level. To support as many devices as possible, you should set this to the lowest version available that allows your app to provide its core feature set.
5. Leave all of the other options (TV, Wear, Android Auto and Glass) unchecked and click Next.
6. Under Add an activity to mobile, select Blank Activity and click Next.
7. Under Customize the Activity, change the Activity Name to MyActivity. The Layout Name changes to activity_my, and the Title to MyActivity. The Menu Resource Name ismenu_my.
8. Click the Finish button to create the project.
Your Android project is now a basic "Hello World" app that contains some default files. Take a moment to review the most important of these:
app/src/main/res/layout/activity_my.xml
- This is the XML layout file for the activity you added when you created the project with Android Studio. In this XML contains one Relative Layout and one Text View. This Text View contains the text called "Hello Sandy!!!".
Activity
class starts the activity and loads the layout file that says "Hello Sandy!!!".app/src/main/AndroidManifest.xml
app/build.gradle
Running Your App On Real Device:
If you have a device running Android, here's how to install and run your app.
- Plug in your device to your development machine with a USB cable.
- Enable USB debugging on your device.
Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.
- On Android 4.0 and newer, it's in Settings > Developer options.
Run the app from Android Studio:
- Select one of your project's files and click Run from the toolbar.
- In the Choose Device window that appears, select the Choose a running device radio button, select your device, and click OK .
Android Studio installs the app on your connected device and starts it.
I hope this article was helpful for beginners trying to create a simple Project using Android Studio .
I will come with new interesting topics in android in further articles.
I will come with new interesting topics in android in further articles.
Sandeep K
|
|
Android developer
|
|
Nanite Solutions
sandeep@nanitesol.com
+91 - 7411868235
|
|
Thanks,
Guided by: Praveen Kumar,Co-founder and President, Nanite Solutions, praveen.kumar@nanitesol.com