This lesson shows you to make a Project with
Android Studio .
You ought to likewise read Overseeing Projects
An Android venture contains every one of the records that involve the source code for your
Android application.
This lesson demonstrates to make another venture either utilizing Android Studio or utilizing the SDK instruments from an order line.
Note: You ought to as of now have the
Android SDK introduced, and in case you're utilizing Android Studio, you ought to likewise have Android Studio introduced. On the off chance that you don't have these, take after the manual for Installing the Android SDK before you begin this lesson.
Make a Project with Android Studio
In Android Studio, make another task:
On the off chance that you don't have a task opened, in the Welcome screen, click New Project.
On the off chance that you have a task opened, from the File menu, select New Project. The Create New Project screen shows up.
Round out the fields on the screen, and snap Next.
It is less demanding to take after these lessons in the event that you utilize the same qualities as appeared.
Application Name is the application name that appears to clients. For this venture, utilize "My First App."
Organization space gives a qualifier that will be added to the bundle name; Android Studio will recollect this qualifier for each new venture you make.
Bundle name is the completely qualified name for the task (taking after the same standards as those for naming bundles in the Java programming dialect). Your bundle name must be remarkable over all bundles introduced on the Android framework. You can Edit this quality autonomously from the application name or the organization space.
Venture area is the catalog on your framework that holds the task documents.
Under Select the structure calculates your application will keep running on, check the case for Phone and Tablet.
For Minimum SDK, select API 8: Android 2.2 (Froyo).
The Minimum Required SDK is the most punctual rendition of Android that your application underpins, showed utilizing the API level. To bolster however many gadgets as would be prudent, you ought to set this to the most reduced form accessible that permits your application to give its center list of capabilities. On the off chance that any element of your application is conceivable just on more current adaptations of Android and it's not basic to the application's center list of capabilities, you can empower the element just when running on the forms that bolster it (as talked about in Supporting Different Platform Versions).
Leave the greater part of alternate alternatives (TV, Wear, and Glass) unchecked and click Next.
Exercises
A movement is one of the recognizing components of the Android structure. Exercises give the client access to your application, and there might be numerous exercises. An application will as a rule have a fundamental action for when the client dispatches the application, another movement for when she chooses some substance to see, for instance, and different exercises for when she performs different assignments inside of the application. See Activities for more data.
Under Add an action to <template>, select Blank Activity and snap Next.
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 is menu_my.
Click the Finish catch to make the undertaking.
Your Android undertaking is presently an essential "Hi World" application that contains some default records. Pause for a minute to audit the most vital of these:
application/src/primary/res/design/activity_my.xml
This XML design document is for the movement you included when you made the undertaking with Android Studio. Taking after the New Project work process, Android Studio gives this document both a content perspective and a sneak peak of the screen UI. The document contains some default interface components from the material outline library, including the application bar and a skimming activity catch. It likewise incorporates a different format document with the primary substance.
application/src/fundamental/res/design/content_my.xml
This XML design record lives in activity_my.xml, and contains a few settings and a TextView component that shows the message, "Hi world!".
application/src/fundamental/java/com.mycompany.myfirstapp/MyActivity.java
A tab for this record shows up in Android Studio when the New Project work process wraps up. When you select the record you see the class definition for the movement you made. When you assemble and run the application, the Activity class begins the action and loads the design record that says "Hi World!"
application/src/principle/AndroidManifest.xml
The show document portrays the key attributes of the application and characterizes each of its segments. You'll return to this document as you take after these lessons and add more segments to your application.
application/build.gradle
Android Studio utilizes Gradle to assemble and fabricate your application. There is a build.gradle document for every module of your task, and a build.gradle record for the whole venture. More often than not, you're just inspired by the build.gradle record for the module, for this situation the application or application module. This is the place your application's fabricate conditions are set, including the defaultConfig settings:
compiledSdkVersion is the stage form against which you will gather your application. Of course, this is set to the most recent rendition of Android accessible in your SDK. (It ought to be Android 4.1 or more prominent; in the event that you don't have such a rendition accessible, you should introduce one utilizing the SDK Manager.) You can in any case fabricate your application to bolster more established forms, yet setting this to the most recent adaptation permits you to empower new components and advance your application for an awesome client experience on the most recent gadgets.
applicationId is the completely qualified bundle name for your application that you determined amid the New Project work process.
minSdkVersion is the Minimum SDK adaptation you determined amid the New Project work process. This is the most punctual adaptation of the Android SDK that your application underpins.
targetSdkVersion shows the most noteworthy rendition of Android with which you have tried your application. As new forms of Android get to be accessible, you ought to test your application on the new form and upgrade this worth to coordinate the most recent API level and accordingly exploit new stage highlights. For more data, read Supporting Different Platform Versions.
See Building Your Project with Gradle for more data about Gradle.
Note additionally the/res subdirectories that contain the assets for your application:
drawable-<density>/
Indexes for drawable assets, other than launcher symbols, intended for different densities.
format/
Index for records that characterize your application's client interface like activity_my.xml, talked about above, which depicts a fundamental format for the MyActivity class.
menu/
Catalog for documents that characterize your application's menu things.
mipmap/
Launcher symbols live in the mipmap/organizer as opposed to the drawable/envelopes. This envelope contains the ic_launcher.png picture that shows up when you run the default application.
values/
Registry for other XML records that contain a gathering of assets, for example, string and shading definitions.