Android With Kotlin And Android Studio For Absolute Beginners | Ryan Kay | Skillshare

Android With Kotlin And Android Studio For Absolute Beginners

Ryan Kay, Self-taught Android Developer/Teacher

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
9 Lessons (43m)
    • 1. Overview And Introduction To This Class

      2:20
    • 2. Android Studio For Android Development

      2:52
    • 3. XML - The Five Minute Language

      6:51
    • 4. Configuring Android Virtual Devices With AVD Manager

      5:09
    • 5. Creating A New Project and Project Explorer Main Directories

      5:31
    • 6. Resources And Layouts

      5:59
    • 7. Android Manifest And Creating An Activity

      6:35
    • 8. Gradle Build Automation Tool

      4:39
    • 9. Deploying To A Device

      2:50

About This Class

This class is designed to get you started with the preliminaries required to start your journey as an Android Developer. While we will be using Kotlin for this class and many of my others, this class will still be useful as an introduction for Java Developers looking to learn the basics of Android Studio.

Note: This is an introductory course for absolute beginners, watch for more advanced content in another class!

Topics for this course include:

  • Android Studio IDE
  • Introduction to XML eXtensible Markup Language
  • Testing and Deploying to Virtual (Emulators) and Physical Devices
  • Using Mixed Java and Kotlin Sources in Android Studio
  • Resources and Layouts (User Interface)
  • The AndroidManifest configuration file
  • The Gradle build automation tool
  • Overview of the most fundamental directories and Android SDK classes necessary to get you started.

Transcripts

1. Overview And Introduction To This Class: welcome to part six of my course. So about a month ago I pulled my students and asked what they would like to see in this particular course. And of course, the number one request was just add things about Android, so that's totally understandable. Most people who are taking this course are probably either Andrew developers looking to transition from Javy into Scotland or just developers looking to transition into Android in general. So by popular request, I have decided to begin adding content on creating android applications using coddling in this course. And that's what will be covering in Part six. Now for parts 1 to 5 of this course, we will continue to Onley work with lessons that can be completed using the tried Ocotlan lang dot or go online editor. But unfortunately, it simply isn't possible for me to teach android development effectively using the browser based Scotland I d. So with that in mind, in the next lesson, we will talk about the industry standard choice for Android Development, which is Android studio. I will be using Android Studio to complete the lessons from here on when appropriate, and if you have a computer powerful enough to rent it. Then I suggest you do the same. Part. Six of this course is going to be all of the preliminary downloads, information and things you need to know to get started with Android Development to be a little more specific will be looking at first off, selecting an I D e e, which, if you remember from one of the earliest lessons in this course, is the program you'll be writing programs in were integrated design environment. We'll learn about the five minute language XML extent extensible markup language. Learn how to set up or use devices and emulators, which is how you will test your applications or one of the ways you'll test your applications. Will have a quick look at how Android studio is able to work with both Jabba and Cotton sources. Even within the same project will look at using resources and layouts, which are incredibly important for android applications. We'll have a quick look at the Android Manifest Configuration file, which is one of the most important configuration files in any android project. We'll talk about the basics of using the Grateful build tool and to finish things off, we'll talk about deploying our first application to either a device or an emulator 2. Android Studio For Android Development: Android studio is widely considered to be the industry standard tool for android development. It's based on intelligent e idea created by Jetbrains, which also happens to be responsible for the Katelyn language. And it's developed by the Andrew team, which is created by Google, which also happens to be responsible for the Android OS. So with that kind of support, you can imagine why this is probably the best option for you now. Just a quick reminder. Andro Studio is what is known as an I. D E or integrated development environment, and this is a big fancy word for a program you write programs in. Now. I won't go into too much detail about what that means, but we will talk about the different features which 100 studio provides. Andrew Studio provides an extensive suite of tools for developing android applications on top of the features and designs of the intelligent E idea program. In combination with the Great Ill Bill Tool, which will be discussing shortly, developers can take advantage of, among other things, graphical editors for designing parts of the user interface, so layouts and views integration with revision control systems such as get Spn and mercurial multi module and platform project. Sport deployment options for physical devices such as your phone emulators for testing on virtual devices, which will also discuss shortly logging, performance and debugging tools. And quite relevant to this course in multi stage compilation process, which supports both mixed Jabba and Scotland sources or entirely Kotla, nor entirely Jabba sources in the same project. Before proceeding to the next lesson, please visit developer dot android dot com slash studio and from there you can download Android Studio now. Unfortunately for some of you, you're not going to be able to run Android Studio because it can have some pretty high requirements for your system. So there are other options you could use. So, for example, you could use Eclipse plus Android plug ins. I do not suggest you stick with that for the duration of your android career because Android Studio really is the best option. But as long as you have some kind of program which has a text editor which supports Java, Scotland and XML, you have some kind of compiler included in this program, which can compile both Java and Colton sources or at least Scotland sources and this program has some way of deploying those programs, either to an emulator or to a device. Then you should be able to follow along with the course. So before you proceed to the next lesson, please either download and install Android studio or figure out some kind of alternative to it, which provides the features that I just mentioned. 3. XML - The Five Minute Language: XML, which stands for Extensible Markup language, is what I like to call the five minute programming language. It's very similar to HTML, except that it has fewer rules now in the past and still today. It is frequently used as a language for modeling and sharing data in a format which is readable both for humans and four machines. Nowadays, we typically advise using Jason instead of XML for transferring data across the Web and things like that. But we still use X smell quite frequently for the android platform in terms of creating things like layouts, views and configuration files. So we will be discussing a few of those different things shortly. But for now, let's just familiarize ourselves with the basic structure of an XML document before proceeding. Please create a file either an android studio or even in just a basic text editor, which has the file extension dot xml. At the end, I've chosen to call it extensible markup language. So in this very simple declared of style programming language, most of what you'll be doing is creating tags. So the first tag will look at is an optional doc type tag looking like so and so how this basically works is similar to an HTML document. Certain programs will require that you specify the DOC type, which is specified here. XML and ah, encoding format and version. Don't worry too much about that stuff. You'll never in Android as far as I'm wherever have to edit that and often times you don't even need to include this doc type element in the file you're working with. Android Studio will be able to infer that it's an XML document based on the file extension at the end. All right, so as mentioned before, XML is very similar to HTML, except that it has fewer rules about the specific tags that you have to use. In fact, the program, which interprets the XML that you're feeding your XML file into, will basically entirely dictate which tags or elements and things will see in a moment called attributes of Name Spaces, which you need to be using in order to properly configure whatever you're trying to properly configure. Let's start by creating some basic tags which have nothing to do with the android operating system. So I'm just gonna create attack by hitting the arrow key here and I'm gonna take human, and I'm gonna close that tag. And as you can see, Andrus video has automatically added a closing tag. So what I'm gonna do next is I'm going to create a comment indicating that the first tag is on open tag. So I'm going to hit arrow, exclamation mark, dash, dash And then I'm going to hit dash, dash, exclamation mark arrow. And this is how we create a comment. Ignore the error showing up here. My i d is kind of glitch ing out. So in this garment tag, I'm just going to specify that be low is on open tag, and then we're going to just copy and paste that into here, and this is going to be a closed tag. And what dictates whether something is an open or a closed tag depends on where the slashes essentially. So if we have no slash, this indicates that there will be some kind of closing tag to finish off whatever tag we're working with. And then the slash at the front of the arrows will indicate a closing tag. So the rules for what we can put inside oven open tag is also quite open, so we could either put Brock text data and sometimes that's what we'll be doing. And we can also nest tags within each other. So here we have a tag human, and I'm going to give it, uh, name tag. As you can see, I'm totally making this up as I go. This is not actually supposed to reflect anything important here or anything you'll be writing on Android and for the name field, we're going to type John Doe. Sometimes it will be necessary to create a new tag, which doesn't actually allow any elements within it. And what that looks like is we create the name of the tag that we want, and then we add the slash at the end of the name as opposed at the start, and this indicates a tag which is basically open and closed at the same time. So there isn't too much else to the XML programming language. We only have two other topics. So, for serves, we need to talk about what an attribute is. So I'm going to create a tag which you will be becoming familiar with on the android platform, says Tag is going to be called text view like so and I'm going to immediately close the tag . So the way that you create on attribute for a particular element or tag is you type the name of the attribute. So in this case, we're gonna type text followed by an equal sign, and then you will provide the actual value which you want to give to the attribute. So in this particular case, we're going to type hello universe, and that is our attribute. So the only other thing you need to know about XML is that attributes can have name spaces . So rather than giving a lengthy explanation of what those are, let's just look at a practical example of a name space. So what I'm going to do is I'm going to include a second tribute in this tag called text and we're going to tape hello world now. Normally, if we did not have a name, space, which will see in a moment, then very likely will have issues with the program which is interpreting this particular tag. There's going to be a repeated tag and it's not necessarily going to know which one to pick . So the way that we can kind of specify different tags which are sorry. Different attributes which have the same name is we can give them a name space. So all this really is is it's just a way of differentiating different attributes. So the one which will be using primarily is going to be the android name space, which will see in a moment when we look at XML layouts and another one which you may end up using is a name space for design time attributes called tools. So by having a different name space, this is going to make it so that our program can know which particular attribute to work with the Android will be something that the program understands to actually use in the productive the produced application, whereas tools as basically name space, which indicates design time attributes and those things will basically be removed from the produced application 4. Configuring Android Virtual Devices With AVD Manager: before publishing an application to a distribution platforms such as Google play. It is a mandatory importance to deploy the application to either a physical device, such as an android smartphone or to an emulator. Whichever option you choose, you will be expected to be capable of deploying your applications frequently in this curriculum or this part of the curriculum and throughout your career as an android developer. While it is possible to test your applications entirely through emulators, I strongly recommend having at least one physical device, which you can deploy your application to now in order to actually use the device. You only to enable USB debugging, which may also require enabling developer options on your particular device. So before you proceed, if you're going to be using a physical device, please check out the link provided in the description for more options on enabling developer options for your device. For those of you who have a more powerful computer, Android studio comes with the Android Virtual Device Manager Tool, which allows for creation, configuration and deployment of emulators. Emulators are virtual devices, so essentially it's like running some kind of phone on your computer to put it in simple terms, and they can be configured for specific device models, operating systems and quite a few different features like that. While hundreds studios emulators have increased in performance quite a bit over the past few years, they're often subject to instability and high system requirements in order to run smoothly . For this reason, it is generally advisable to have at least one physical device to test deploy your applications in order to set up a new emulator. You're going to want to click on the AIVD manager icon up in the toolbar here, or if you're unable to locate it, because they've once again changed what the particular icon looks like. Just go to tools and then AIVD manager. So in the AIVD manager, As you can see, I have quite a number of different devices already configured. So if you want to create a new one, go ahead and hit. Create virtual device down in the corner here, and what you can do is you can select a particular device, which you would like to use for your emulator. Generally speaking, I select Nexus five X cause that's one of my favorite devices of all time, so anyways, Whichever you pick, just go ahead and hit next. Now you're going to basically need to download on image or an operating system in order to actually deploy the application. Now, in general, I usually recommend a P I level 21 or higher because that is one of the most recent major updates to the operating system. And you will cover something like 86% of devices by doing so. That number will, of course, change over time, depending on when you watch this. Ah, but you can start with either something about a p I level 21 if you have ah, sort of a higher end computer. Maybe try going with a P I 24 But just understand that these emulators can be very buggy, depending on what kind of system you're working with. So I'm going to select a P I Newgate or Level 24 I'm gonna hit next. So there are a lot of options for configuring a virtual device, most basic being giving it a particular name. Now, I would like it if I could give you very specific instructions for creating the best android emulator for your system. But to be honest, it depends a lot on whatever a particular system that you're working with to give you a basic idea. You can tweak thes options here, in some cases, to improve the performance of your emulator. But doing so may cause problems with your operating system. So just understand, depending on what operating system you're using and what kind of read you have. Ah, you could experience pretty frequent crashing from the emulator Anyways, once you selected options which seem appropriate, then you can go ahead and hit finish, and that will create the new emulator. Once you have an emulator configured, one of the ways that you can start it up is by hitting the green play button over here. Ah, the pencil icon allows you to edit the particular AIVD, and then this drop down menu gives you a few more options here. So in particular, after you deploy your emulator and you want to stop, it s so that it's no longer eating any resources for your computer. What you're generally gonna want to do is you're gonna want to hit this refresh button down here, and then once you hit that, you should be able to select the active emulator and hit stop. It's currently great out since I don't have the emulator running and I'm not gonna even try and record at the same time. Now, another way to start up in emulator and just directly deploy your application is in the main screen for Android studio. Just hit the run button up here, and what it will do is it will provide you with list of either connected physical devices. Oh, our virtual devices if they're running, and then it also gives you the option to select the different virtual devices that you've configured. 5. Creating A New Project and Project Explorer Main Directories: in this part of the curriculum, we're going to figure out how to create a new project inside of Android Studio and they will talk about some of the important files and directories within that project. So if you already have an active project open, then you can actually just go to the new new project under the file menu. What I'm gonna do is I'm gonna hit Close Project, which should bring me to the main screen of Android Studio, where most people will be starting from and from here. What you want to select is start a new android studio project. In this case, what we're going to select is add no activity over here, then click next and for the name of the application, we're going to call it Hello road now for the package name. As you can see, it's automatically generated. Generally speaking, what you'll be doing is if you have something like a website or some kind of unique identifier, then you want to use that as the package name and we'll talk about this more later on. But basically whatever package name you, you upload an application to say Google play to you will need to keep that package name the same if you want to continue to update that particular project. So the package name is pretty important and one of its primary purposes is to provide a unique identify air for your application. Save location is, of course, the place. Where are the directory in which the project will be created? You can select whatever you like and make sure you select Scotland for the language as mentioned before. If you select a minimum a P I of 21 then you're going to cover approximately 85% of devices . Generally speaking for beginners, I do suggest you select either a P I 21 or something higher, so it isn't especially important for the purposes of this tutorial. But in production applications, I do prefer to have this box here checked. Use android X artefacts and this basically changes where you're downloading your dependencies from now. If you have no idea what that means, don't worry about it, and you can leave a checked or unchecked. Doesn't really matter too much, s. So what I'm gonna do is I'm gonna go ahead and select that and then I'm going to hit finish . So as you can see here, I've created a new project, an android studio called Hello World. And the first thing you're gonna want to do is you're going to want to open up the project , Explore Now, if for some reason this tab is hidden very often, you can open it by hitting Ault one. And if you see like a number beside the particular tab, then you can use the Ault key in order to open it. So once you have the Project Explorer open, which is this window here, the very first thing I'd like you to do is to hit the drop down menu and then select just project files. This effectively changes what the Project Explorer looks like and it gives you the most accurate representation. So before we proceed, we need to nail down a couple of definitions. So on Android Project essentially refers to all of the files contained within the root folder of your android project. So this would include files which are generated by the, uh I. D. So, for example, you have, like, the idea folder here. Ah, apa's we'll see in a moment is generally speaking where most of the coding will actually go on. But that can change a little bit, depending on if you're doing a multi model project or not. So if the contents of our Hello World folder are rueful to hear constitutes an android project, what constitutes an android application is essentially a compiled version of the different files that you'll see in here now. Obviously, we won't use all of the files. Eso What is compilation, meaning It basically means taking the code that we write in more human, readable languages such as Java or Scotland or XML, and then turning that into JV M bite coat. The way that this process is achieved is by actually building the application, which you could do by hitting are going up to the build option here and then hitting make project. So something you may be wondering is how Android Studio is able to basically work with and compiled together applications which are made entirely in Scotland entirely in Java or some mixture of both. So the key to this process is that both Scotland and Jabba are capable of being compiled to the JV M have a virtual machine, and that Java virtual machine interprets what is known as jbm byte code. So how this process is achieved is basically android Studio uses compilers. So we have the Java compiler and the Scotland compiler. That's what the C stands for and what it will do is it will feed both our Scotland source files and our Jabba source files eso source files being the things that we right through both compilers like So now I'm actually simplifying this process somewhat. But ultimately, by feeding these different files through both e katelind compiler and the Jave a compiler, the different source files will be able to talk to each other and ultimately everything gets compiled by the compiler. So compiling basically means going from calling her Jabba into bike code in this case something that the computer can understand a little easier. Ultimately, everything gets compiled to jave, a white coat 6. Resources And Layouts: in this lesson. We're going to talk about resources and layouts, so make sure you have the Project Explorer open. And if you happen to be on the android Project Explorer of you, you're probably gonna want to change that to project files. So what we're gonna do is ah, in any new generated android studio project. Unless you've really messed up the configurations for it, you'll find a module called APP. So if you're wondering when a model is, that's basically a term from Grade A, which will talk about later. But for an easy to understand definition, this is where most of the actual code for the application itself will be written. So what I'm gonna do is I'm gonna click on the arrow toe, expand that and then we're gonna click on the source directory here, sore standing for source files that I'm gonna hit mean now. What will be focusing on in this lesson is the rez directory here and read stands for resources. Go ahead and open up the rez directory like So now what I'm going to do is I'm going to briefly overview the different directories and what they do, but I want to emphasize that there's no need to actually write this down and try and memorize it. You will get plenty of experience working with the files instead of the rez directory, simply building applications. So don't worry too much about memorization, but let me just give you a quick overview. So Indra bubble. We have graphic resources, which may be of various formats so they could be PNG or J P G files those air known as raster graphics. And then you could also include things like SPG files. As you can see here, this is an SPG, and that's actually a vector based trouble. Notice how many of these files have these? Strange what I'll call qualifiers Added to them dash something or other. This is basically how you specify resources to be used. So resources being things like images, text, stuff like that, this is actually how you specify different AP. I levels screen densities and various things like that. So if you're working with things like Raster graphics, for example, you're going to want to specify different draw balls of different resolutions, depending on what size of screen you're working with. Now, this MIP map folder here is specifically used for launcher icons, whereas the general purpose image trouble type resources. You'll want to put that in the drop ball folder and then also very importantly, we have the Values folder. There's many more things that we could add to the Values folder, but for starters, we have the colors XML file. And so this is where you can basically define color scheme for your application. We also have strings dot xml. So in this particular case, this would be if we have any string data that we want to include in the application. Now, one thing you can do is you can add some qualifiers to different ah values folders. So, for example, we could do foot values Dash E End to specify English text. Then we could create another folder called Values Dash Fr, for example. Uh, if you want to add a French fighting in your application, and then we also have this styles dot xml file. Now it doesn't actually matter so much what this file is called. You can basically just make sure that you have the resources tag specified. But generally speaking, within this newly generated styles dot xml file, you can specify a theme for your application. And as you can see, this is partly based on what is configured in the color start XML file. All right, so one folder, which will also become very familiar with within the Erez directory, which has not been created yet because we chose not to create an activity, is the layout folder. So what we're gonna do is we're going to create a layout resource. So what you can do is you can right click on the rez directory here, go to new, and we're going to pick Android Resource file. We're going to give a particular name to this file, although it's not super important what it is that's going to be activity underscore preferences for the resource type. We're going to select layout for the root element. We can just leave that as a linear layout source set Main is fine, and we do want the directory name to be layout, and that should have been specified up here. So down below, here is where you can specify different qualifiers for things like region locale. Uh, what orientation the screen currently is in. So, for example, we could click on this. Uh So, for example, we could click on orientation here, click this double arrow, and then it's kind of messed up here, as you can see. But what we can do is we can specify, for example, portrait, landscape or square. In this case, we don't actually need to do any of this, so I'm actually just gonna hit the double arrow back to get rid of it. And so once you have these options set up, just go ahead and hit, OK, all right. So, as you can see, that's created a new layout. XML file also knows that Android Studio has added in a layout folder in our rez directory here. And then it's also added that particular file to that particular layout directory. Now, layout files are one of the primary means by which we design the user interface in an application. It is possible to build the layouts or the things that the user will actually see in your application entirely programmatically so in calling her Java's sources. But in many cases, it's a little bit more efficient to do it declare itiveness in our XML files. So we have the design time editor here and as you can see, it's really ugly. I'm just going to click on this text, have year to show what this file actually looks like. And as you can see, it's just a linear layout, which is like a view group, and this is where we can place different visual elements, so things like buttons, text views and so forth. I'll talk more about that later. 7. Android Manifest And Creating An Activity: the next file will look at is the android Manifest XML configuration file. So what I'm gonna do is I'm just gonna close at the Erez directory here. Now, within this APP module file here, source and main, you're going to find a file called android manifest dot XML. Go ahead and double click and open that up. So as you can see, there isn't too much going on here, especially because we don't have any particular activities. So we'll look at adding those in in a moment, starting with the basic tags. Here we have the primary manifest tag, so pretty much the only thing you'll need to worry about here is the package attribute here , which dictates essentially the unique identifier for your application. So, hypothetically, let's say I uploaded this application to the Google play store under this particular package name. And let's say I wanted to update this application so that it does something actually useful . If I was to actually change this package name whatsoever, then I could not actually update that same application. It would be uploaded as a completely new application. So whatever you pick for your package name, which was dictated when we created a new project. Just understand that if you want to update an existing application, this attribute here package must be the same thing. Now there are a lot of different things which you can put inside of the manifest tag here. Eso We'll talk about application in a moment. But one thing which might be readily important for you to know is that within the manifest tag, we can specify permissions for the application. So let's say, for example, that we want our application to be capable of sending SMS messages, our text messages, that kind of thing. In this case, we would want to use this Ah, or add in This uses permission tag in the application tag will find different sort of global configurations for the application, so you can specify the primary theme of your application. In this case, it's pointing to our styles dot xml file or a resource within styles DOT XML called AP team . As you can see from the MIT map, resource folders were specifying different icons supports. RTL is basically if you want your application to be usable in countries which right in a different direction than in a typical English label is more or less the name of your application. Now, Like I say, there are a lot of different things you can put in here. So those air kind of just the general points. What will look at next is adding activities into our manifest. To put things in simple terms. An activity can be thought of as a primary user interface screen for your application. So, for example, if I'm looking at my friends in Facebook, that could be one particular activity. Then if I'm looking at my current messages, that could be a different activity. And then, if I'm looking at my news feed or something like that or the posts feed, then that could be its own separate activity. Now we have to be a bit careful here, because recently, application developers on Android have typically began to prefer having a single activity architecture, So I just want to mention that it's gonna be a little bit confusing. But for the time being, just think of this word activity as a primary user interface screen. It's one of the primary building blocks of any android application, so what we're going to do is we're going to create an activity. So I'm gonna go to file new, and we're gonna go down to activity way down here, and we're going to create a nem empty activity. We're gonna leave pretty much all the defaults here, so just go ahead and leave that thing called main activity. Make sure generate layout file is ticked because that's gonna add a layout file into our rez. Leo directory. Ah, layout name activity main is totally fine. Um, we will check. Check this launcher activity box here. Package name. Just leave that where it is. And the source language will need to be Cortland. Once all of those things air selected, just go ahead and hit. Finish. All right. So in using that activity wizard, we've actually kind of done three different things. So the first thing we did is within our Java sources. Understand? We also put our Courtland files here, even though it says Java inner java source files, it has added a file a class file, which in this case is Scotland dot Katie file called main activity. Now, notice that in this on create function, don't worry too much about what it does, but just understand we have this function down here, set content view and notice how that is pointing to the layout file, which was also generated. So if you're wondering what this our thing is, this basically stands for resources, and it's like a giant directory, which we can use to refer to things within a resource directory in her application. So I'm gonna once again open up the resource directory. Then I'm going to select layout. And as you can see, the Wizard has added a file called Activity Main into our layout. So that's the second thing the wizard did for us. But, uh, equally as important is that that editor added on activity tag to our manifest. Now, if you don't use the Wizard to create a new activity, you can actually just, for example, right click on the Java's source directory, go to New Scotland file and we can call something like preferences activity. You can do this if you want, but it's not actually that important. And then, from there we could add in manually another Leah Reserves file. So, for example, like activity preferences. Now, if we do this manually, we have to be especially important that the activity is registered in the manifest. So using the wizard ads on activity tag into the manifest and that little check box that said something about launcher activity basically added this intent filter take here. So all of this crap basically just means that this activity will be the 1st 1 which is run when the application starts. So this is almost kind of similar to, like function main when it comes to building pure Katelyn applications. Now, if you were to manually add an activity and a layout file and not include Anak Tiv ity tag for it in the manifest, then if you tried to actually run that particular activity, you will be met with an error. So, like I said before, there's a lot of different things we can specify in the Android manifest folder. But hopefully that gave you a good starting point. 8. Gradle Build Automation Tool: going from a giant collection of Java, Scotland and XML resources to something which can actually be deployed to an application is a little more complicated than just feeding things into a compiler. That's where a build tool like grade ALS or spring comes in. In Andro studio, we typically used the grade all build automation tool. So what I'll do you in this lesson is I'll just give you an overview of the different Breydel configuration files, which you'll need to work with. So the two files which will need to be most concerned about are the build great all files. Now, in a brand new Android studio project, you will find a bill dot graito file both in the Root Project folder, and this is what's known as the project level build Great I'll file. And then any modules which you add will also have their own build thought grade all files, which are of course, referred to as a module level bill dot radio file. So in the Build Graito file, which sits in the root folder of your project, go ahead and open that up. As the generated comment up above is kindly indicating, Ah, the things which you put in the project level. Build riddle Foul will basically be configurations which are common or exposed to all of these sub projects and modules in the project. So think of this, says configurations for the whole Android project. By default, Graito files are written in the language called Groovy, and this is what Groovy looks like again, I won't be going into too much detail here, but we can specify some versions and different dependencies for the entire project. So dependencies air basically tools which we download and can use in her application notice . We're also talking to different repositories. So, for example, when we need to use tools written by other developers, so AP eyes things like different tools to download data from the Internet to set up a rest adapter, different graphics tools, which we want to use. So things like recycler view so on and so forth. What we can do is we connect to these remote repositories, which are like sort of code bases that are project can download from and integrate, and then we add dependencies to particular, uh, libraries or artifact sa's. They're referred to from these different repositories now the things you find inside the project level build great. I'll file like I said before their configurations, which apply to the entire Android project. When it comes to things we want to add to our android application, where a particular model of her application that's when we need to open up the model level , build great I'll file. So, as you can see in this app level, build greater foul. Gradel has actually done a lot of the work forest. So one of the nice features of this particular build tool is that it's marketed, and I can attest this as having good quality defaults while allowing for plenty of extensive bility. So other than just adding particular dependencies to our application, another way we can expand the functionality of our great all set up is to apply plug ins. So in this case, we already have the and combat android dot application plug in, and that basically provides all these different android configurations for us, So I won't be going into too much detail here because the finer details are not so important. You will understand the men's you keep building android applications, but this is where we can specify, for example, what version were compiling to the minimum version that the application is allowed to be compiled to thes version codes are basically useful when you're actually uploading your application to Google play and a couple other things like that. The only other thing in here I want to talk about are the dependencies. So if you want to use different tools created by other developers or Google's developers and stuff like that, So, for example, the constraint layout, which is a special kind of layout, which will be talking about soon. What you'll need to do is you'll need to add basically ah, link to the repository artifact in order to download the dependency so that you can actually use it in your project again. There's plenty more to discuss here, but this should be a decent enough basic introduction to grade all. And like I said before, the files that you want to care about most are going to be the Belgrade all files, and that'll be the project level build Grable file, which is in the root folder of your project. And then, of course, the module level build cradle files and like I said before, If you have a multi module application, which this is not, then you will have a build greater fall for each individual module. Anyways, that's a more advanced topic which weaken talk about later. 9. Deploying To A Device: Okay, so the last thing will do in this tutorial is well, actually deploy an application to a device. So what I've done is I've hooked up my nexus five to my computer via USB, and it's configured to go if you don't have a physical device than this is when you would want to open up the AIVD manager as discussed before and go ahead and start up on emulator . Now, before we deploy the application, I should probably add some kind of visual elements to it. So I'm going to go to the rez lay of directory, open activity main dot xml. And what I'm gonna do is you should see a pallet tab here gonna click palette. But I'm gonna click on this text view thing here, and I'm gonna click and drag one of these into the middle of our screen here. As you can see, just try and get it centered. There we go. Now, with its selected don't worry about the finer details here, but with this text for you selected Ah, and this is basically just a way to add text to the screen. There's this magic wand icon up here called in for constraints. So with the text few selected, I'm just gonna hit that. And that's going to constrain this text view to the centre of the devices screen. Now, what I'll do next is currently I'm in the design editor and I'd actually like to just directly edit the XML, which this design editor is based on. So I'm going to click on this text tab down here. And as you can see, we have a bunch of stuff already added for us. I'm gonna create a new XML attributes of this one's gonna be android and this is going to be text size. And then in there we're going to take 32 SP. Now. Another thing is in the android text attribute. We're going to type Hello world now jumping back to the design editor. As we can see, that has increased the font size of that particular text view. And the last thing we'll do is we'll actually deploy this application to a device. Now when we actually want to deploy an application, you may need to build it by hitting make project. But in any case, what you can do is you can hit the green play button up here or run button. And so if you have virtual device running, it should show up in connected devices. In this case, I have connected my nexus five x to the computer using a USB, and I have USB debugging enabled in the developer options as discussed before. So when you're all set hit, okay and hopefully you won't see any errors. So after hitting the run button, my Nexus five is now displaying a very ugly little application, which you can barely see. But there it is. So if you manage to actually deploy your application to some kind of device physical or otherwise than congratulations, you are now on Android developer.