In Android Studio, make another venture:
On the off chance that you don't have a venture opened, in the Welcome screen, click New Project. In the event that you have a task opened, from the File menu, select New Project. Arranging another extend in Android Studio. Under Configure your new extend, fill in the fields as indicated in figure 1 and click Next. It will most likely be simpler to take after these lessons in the event that you utilize the same values as indicated. Application Name is the application name that seems to clients. For this undertaking, utilize "My First App." Organization space gives a qualifier that will be added to the bundle name; Android Studio will recollect this qualifier for every new extend you make. Bundle name is the completely qualified name for the task (taking after the same leads 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 worth freely from the application name or the organization area. Venture area is the registry on your framework that holds the task documents. Under Select the structure figures your application will run on, check the container for Phone and Tablet. For Minimum SDK, select API 8: Android 2.2 (Froyo). The Minimum Required SDK is the most punctual form of Android that your application backings, showed utilizing the API level. To backing whatever number gadgets as could be allowed, you ought to set this to the most reduced variant accessible that permits your application to give its center list of capabilities. On the off chance that any peculiarity of your application is conceivable just on more current renditions of Android and its not basic to the application's center list of capabilities, you can empower the gimmick just when running on the forms that help 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 An action is one of the recognizing peculiarities of the Android structure. Exercises furnish the client with access to your application, and there may be numerous exercises. An application will typically have a principle movement for when the client dispatches the application, an alternate action for when she chooses some substance to view, for instance, and different exercises for when she performs different undertakings inside the application. See Activities for more data. Under Add an action to your venture, select Blank Activity and click Next. Under Describe the new movement for your task, leave the fields as they are and click Finish. Your Android venture is currently an essential "Hi World" application that contains some default records. Take a minute to audit the most vital of these: application/src/fundamental/res/format/activity_my.xml This is the XML design document for the action you included when you made the task with Android Studio. Emulating the New Project work process, Android Studio give this record both a content perspective and a review of the screen UI. The document incorporates some default 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 completes. When you choose the document you see the class definition for the movement you made. When you assemble and run the application, the Activity class begins the action and burdens the design record that says "Hi World!" application/src/res/Androidmanifest.xml The show document portrays the central attributes of the application and characterizes each of its segments. You'll return to this record as you take after these lessons and add more segments to your application. application/build.gradle Android Studio utilizes Gradle to gather and construct your application. There is a build.gradle record for every module of your undertaking, and also a build.gradle document for the whole extend. Generally, you're just keen on the build.gradle document for the module, for this situation the application or application module. This is the place your application's fabricate conditions are situated, including the defaultconfig settings: compiledsdkversion is the stage adaptation against which you will incorporate your application. As a matter of course, this is situated to the most recent variant of Android accessible in your SDK. (It ought to be Android 4.1 or more noteworthy; on the off chance that you don't have such a rendition accessible, you must introduce one utilizing the SDK Manager.) You can even now construct your application to help more seasoned variants, however setting this to the most recent form permits you to empower new gimmicks and enhance your application for an incredible client encounter on the most recent gadgets. applicationid is the completely qualified bundle name for your application that you indicated amid the New Project work process. minsdkversion is the Minimum SDK rendition you determined amid the New Project work process. This is the most punctual adaptation of the Android SDK that your application helps. targetsdkversion shows the most noteworthy variant 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 overhaul this worth to match the most recent API level and accordingly exploit new stage characteristics. For more data, read Supporting Different Platform Versions. See Building Your Project with Gradle for more data about Gradle. Note likewise the/res subdirectories that contain the assets for your application: drawable-hdpi/ Registry for drawable articles, (for example, bitmaps) that are intended for high-thickness (hdpi) screens. Other drawable registries contain resources intended for other screen densities. Here you'll discover the ic_launcher.png that shows up when you run the default application. design/ Registry for documents that characterize your application's client interface like activity_my.xml, examined above, which portrays an essential format for the Myactivity class. values/ Registry for other XML documents that contain an accumulation of assets, for example, string and shade definitions. The strings.xml document characterizes the "Welcome world!" string that shows when you run the default application.
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2015
Categories
|