‫-: Hi.
‫Now that we are done with the installation process,
‫we're going to create our first project
‫in our Android Studio
‫and actually create our first app as well.
‫So open your Android Studio and all you have
‫to do is just start a new Android Studio project
‫and from now on it'll be the same
‫for Windows and Mac and Linux and everything as well.
‫So I'm going to continue with my MacBook over here.
‫Okay, just make sure, oh, just click your
‫under Android Studio and open this little pane over here
‫and hit Start a new Android Studio project.
‫There are couple of settings that we want to change
‫about Android Studio
‫but we're going to do that afterwards
‫we create our first project.
‫So, when you start a new project
‫it'll ask you some kind of theme.
‫So, as you can see
‫there are some options over here like basic activity
‫empty activity, like Google Maps activity.
‫So activity means a screen that user interacts.
‫Okay? So we are going to create activities
‫and this is asking for some kind of team
‫if we want some kind of team, like maps
‫or basic buttons or login or some kind of menu activity.
‫And in fact, at the beginning we don't need
‫any of this, right?
‫We only need an empty activity to learn
‫about Android development.
‫So I'm going to choose empty activity and continue.
‫And over here you will see some kind
‫of configurations for your project.
‫And if we had chosen another activity from here
‫we will just get the same.
‫Just make sure you choose the empty activity.
‫Over here, this is our project name
‫so you can call it whatever you want
‫like My project or My activity or My app.
‫So I'm going to just call this our application
‫because it isn't specific to our activity, actually.
‫An app can contain more than one screen
‫as you might imagine.
‫So we are going to add much more screens later on
‫in this course, but right now we are creating our first app.
‫So I'm going to name this my first application
‫and we are starting with an empty activity.
‫Over here we see something called package name
‫like com dot example dot My first application.
‫And package name is the unique name,
‫unique identification of our application.
‫So this has to be there because the platforms
‫like Google Play identifies applications
‫with this unique package name,
‫so this is kind of important.
‫And make sure you change this example as well.
‫For example, rather than example you can write your own name
‫like Atil Sam: com.atilsam.myfirstapplication
‫would be a very good package name for this application.
‫So every application has its own package name
‫and they're unique.
‫So over here you see the same location of this project.
‫It really doesn't matter where you save it
‫unless you have some spaces
‫or some kind of funny characters in your location.
‫Again, like in the SDK
‫make sure you don't have any spaces, anything
‫like some funny characters over here, non Latin characters.
‫It would break your connection.
‫In the language part, we have either Java or Kotlin.
‫We are gonna go but Java.
‫So we have two options right now
‫for native Android development, Java or Kotlin.
‫It doesn't really matter for Android development
‫but we are going to start with Java.
‫So in the minimum API level, we define the minimum level
‫of telephone support for our app.
‫Like we have a lot of APIs, a lot of versions
‫of Android actually.
‫And every year maybe you track that under
‫it releases a new version like Oreo or PI or Q.
‫So we see those applications, we see those versions over
‫here and we choose the minimum level that we want to reach.
‫So the less we choose from here, like API 22, API 23,
‫the broader range that we actually reach,
‫like as you can see in the 23, 62% of the devices
‫are compatible with our app.
‫So we wanna go for something like 1917, maybe.
‫We don't wanna go less like we don't wanna choose API one
‫because this time we won't be taking advantage
‫of the newer technologies that Android brought us
‫so many years back.
‫Like you don't wanna choose API 27, 28, 29 because then
‫you will just reach 1% of the current devices.
‫So it won't make sense to you, it won't make sense
‫to you just develop this app and put it on the Play Store
‫because very few people can download it anyway.
‫So generally developers try to find an optimized way
‫like API 1920 currently in order to define
‫the minimum application API level.
‫So it really doesn't matter for us because we are
‫doing this just for tests.
‫So choose API 27.
‫So AndroidX artifacts is a way
‫to organize the Android files inside
‫of the Android application.
‫So make sure AndroidX is checked.
‫If it's uncheckable for you, it's better.
‫Just make sure this is checked, okay?
‫So this will bring you the opportunity
‫to use the latest dependencies, latest libraries
‫in your app as well because if you don't use it
‫your app won't be compatible with the latest technology.
‫So that's it, that's all the settings that we want to do
‫before we create our first app.
‫So make sure you do the same thing,
‫you follow the same settings and then hit finish.
‫Once you hit finish, it will install
‫if there is any SDKs or any plugins that is missing.
‫And you can just hit finish one more time to
‫create your application project.
‫So you will see a screen like this once you hit finish.
‫And this is the screen of Android Studio.
‫Here you go.
‫And it will take some time
‫because it will download some kind of gradle files,
‫some necessary files to make your project work
‫for the first time that you're running this.
‫And it can take something like one or two minutes
‫for you and make sure everything is fine over here
‫under the log section, under the bottom of this project.
‫And if it gives you an error, for example
‫in the Windows machine
‫then your antivirus solutions may be blocking it,
‫blocking the download.
‫So maybe you can turn off your antivirus solutions
‫for right now just to let this happen,
‫let this download thing.
‫And if it asks for a permission like this, of course
‫please feel free to upload this so that it'll work fine.
‫On the right-hand side, we generally see this news
‫or assistant, you can just close it down.
‫We don't need this.
‫I'm going to explain it to you.
‫I'm going to explain every detail that you need
‫in order to develop Android applications
‫so that you won't need any assistance
‫or here we see the Android Studio menu.
‫So let me put this face so that you can see it better.
‫In Windows, you can see it on the top side
‫of this Android Studio application as well.
‫On the bottom side
‫we generally see this build, building thing and logs
‫of the application once build is completed successfully
‫you see this green things happening.
‫If you get an error over here, don't worry
‫I'm going to explain how to overcome errors
‫as well in this lecture.
‫Once you open the Android Studio
‫you will see these three main parts.
‫On the bottom side as I explained
‫there is a build section, okay?
‫On the right-hand side you see the coding or design section
‫and on the left-hand side you see the files
‫and folders of your project.
‫Once you create a project,
‫actually there are files and folders created for you
‫in the location that you have specified so
‫that you can actually go and see the files
‫and folders on your computer for yourselves as well.
‫So on the left-hand side we see those files and folders,
‫we can edit them.
‫So it's the same thing with opening them
‫with a text editor and writing inside of them.
‫But of course you will break something if you do that.
‫So that's why we use Android Studio
‫over here in order to generate some kind
‫of quality code for our application.
‫So on the left-hand side
‫under Gradle scripts you will see something
‫called build dot Gradle and that's where you need to edit
‫if you get any errors at this point, sometimes this happens.
‫So if you don't have any errors, if you see Build succeeded
‫on your thing, then don't worry about this.
‫But I'm going to show you anyway because there are a lot
‫of people getting problems over here.
‫So in the Under earth studio menu,
‫just find preferences or settings, okay?
‫It should be under under studio or file.
‫You can reach the settings of your project
‫from here and you can just search
‫for anything like that comes to your mind, like font.
‫You can find the font of your Android Studio.
‫As you can see, it's a little bit small for me
‫so I'm going to increase the size so
‫that I can see better and you can see better as well.
‫Like I made it 18 so you can just follow me as well.
‫So, I believe now you can see it better.
‫So this was the settings part
‫and let me go for the air part.
‫So over here in the build dot gradle,
‫and as you can see we have two build dot gradles
‫on the left-hand side.
‫Please make sure you choose this thing with me.
‫If you couldn't find it, just search a little bit so
‫that you can see the same thing with me.
‫I'm looking for build dot gradle where I can see
‫my application ID, minimum SDK version, target SDK version.
‫These are the configurations that we made when we first
‫created this project and we can change them afterwards
‫obviously. So this is a file that contains our project files
‫like configurations and some kind of dependencies, some kind
‫of libraries that we use in order to run this project.
‫So over here in the dependencies we have something
‫called test implementations.
‫So this is for just testing our code and sometimes
‫they cause some problems.
‫So if you have any problem,
‫it's worth a shot to comment them out.
‫So if you put three slashes over here,
‫double slashes in the three lines and do build, clean
‫and build rebuild from the menu like this, okay?
‫Built clean and built, rebuilt, it'll rebuild the project
‫and if you have any kind of problem it should go away.
‫And if it doesn't,
‫I'm going to explain some other solutions as well.
‫Don't worry.
‫So this is some kind of a weird bug of Android Studio.
‫We know what's causing it,
‫we just notified to Google, they're trying to solve it.
‫Hopefully it'll be solved soon.
‫And if you don't see this problem
‫then you can just use it like this without any slashes.
‫Okay? And as you can see,
‫I don't have this problem over here.
‫So I'm going to continue using this just the way it is.
‫Okay? And in the settings part
‫let's get back to the settings part.
‫You can search for SDK.
‫So if you missed any SDKs,
‫or if you got any error during the installation part
‫then you're gonna have to come back here.
‫Okay? So in the SDK platforms
‫you see what you have downloaded when you give permission
‫to Android Studio to download this SDK to your computer.
‫Okay? And we're here, you see we have the latest version.
‫So maybe you have the under 10
‫our under eight, other versions as well.
‫But you can actually add
‫or remove any version that you want from here.
‫So make sure you're on the latest version, okay?
‫Whether it's under eight, 10 or 11, it doesn't matter.
‫Just make sure you're
‫on the latest version on the SDK platforms.
‫And later on we are gonna go
‫for SDK tools when we deal with the emulator problem.
‫So if you have experienced any problem with installation
‫of HackSim in the previous lecture, don't worry
‫I didn't forget that, we're gonna solve it.
‫So make sure you download the SDK platforms.
‫So in the SDK tools, just try to see what I have
‫installed over here like HackSim.
‫So if you had any bad experiences with the installation
‫of HackSim, you can just try to remove it and install it
‫one more time.
‫But if it doesn't work, I'm going to show you
‫some alternative ways to make this work as well.
‫Don't worry.
‫So you can actually remove and install
‫anything you want from here,
‫but make sure the Androids SDK build tools and later
‫SDK platforms, SDK tools, as well
‫as HackSim is installed right now.
‫And over here under support repositories,
‫we have everything.
‫And make sure you update the Google Play services as well.
‫So if you want to install anything
‫it will ask you to accept the license like this.
‫And if you accept it, just make sure
‫click on next and finish it.
‫Okay? And I believe after installing Google Play Services
‫we are almost done over here in the SDK tools.
‫So let me see if we have anything left.
‫We are gonna talk about HackSim later on, as I said before.
‫And in the support repository, just download everything.
‫And if you're on Windows, you may see some kind
‫of USPD bugging tool under support repositories.
‫Make sure you download that as well.
‫Later on, if you want to use your phone or under a device
‫like an emulator or a simulator for your projects
‫it will be required for you.
‫Okay? So after you are done with this
‫actually you're ready to write your first piece of codes
‫and I believe we managed to solve the problems
‫and you get a green light
‫under the build section here as well.
‫It means that you're good to go, but if you don't
‫make sure you check the Q&A section
‫make sure you write your question
‫with a screenshot so that we can understand it better
‫and we can solve it within 24 hours.