This course contains exercise files that you can use to follow along with the author on screen. Copy the exercise files to your desktop or anywhere on your hard disk. The exercise files are arranged by chapter; each chapter folder contains a project designed to be opened in Android Studio. The projects were created with Android Studio 2.2, but if you open a project with a more recent version you’ll be prompted to update the configuration to work with the version of Studio you’re using.
- [Instructor] This course is accompanied by exercise files that you can use to follow along with the demonstrations on screen. I've copied the exercise files to my desktop, but you can place them anywhere on your hard disk. The Exercise Files directory contains a number of subdirectories. The Assets directory just contains a couple of image files that I'll use for some of the demonstrations. The next three directories are the exercises themselves, organized by chapter. Each of these chapter directories has one or more subdirectories, and each of those contains an Android Studio project with a particular name.
This Android Studio project is called HelloWorld. You can identify an Android Studio project on disk by certain subdirectories that are always present. There will be a directory called app, called the module directory, and another one called gradle, and then you'll find a number of files that have the word gradle in them. If you're working on Windows, you'll probably see this directory named .idea. If you're working on a Mac, that directory is still there, but it will be invisible in Finder. If you don't see the .idea directory at all, it's most likely because you haven't opened the project in Android Studio yet.
That directory and its contents will be generated the first time the project is opened. In order to open any of these projects, you'll need at least Android Studio 2.2.1. You can use that or any later version. And Android Studio is completely free from Google. To open one of these projects, go to the welcome screen and choose Open an existing Android Studio Project. If you placed your exercise files on the desktop, like I did, you can press Control D on Windows or Command D on Mac to jump to the desktop directory.
Then open the exercise files, open the chapter directory, and then under the subdirectory for that video, select the project directory, which is identified by the Android Studio icon. Click OK, and that will open the project in Android Studio. If you see an IDE internal error occurred message, you can ignore it. The first time you open any of these projects, it might take a few minutes, because Android Studio might need to download certain components over the the web.
But then when you open subsequent projects, it should go pretty quickly. At the beginning of most of my videos, I have files already open. You can locate those files over here, in the Project window. From there, you can click the app module, and then open the manifests directory, the Java directory, or res for resources. There's also a directory named Gradle Scripts, that I'll be talking about quite a bit. You can find any particular file by pressing the Shift key twice, that's called Search Everywhere, in IntelliJ IDEA and Android Studio.
So for example, if you wanted to find the file, MainActivity.java, you would press Shift twice, then type MainActivity, and when it shows up, you could then select it to open it. To find the location of that file in the Project window, go back to the toolbar in the Project window and click the scroll from source icon. And that will open up the location of that file in the directory structure. To run the app, you'll need an Android device. Either a physical device or a virtual device.
I'll describe how to create these virtual devices early in the course. And if you have a physical device, I'll show you how to connect it to your development computer so you can easily copy apps over to the device and test them there.
- Installing Android Studio
- Creating your first Android Studio project
- Managing profile files, including Gradle scripts and support libraries
- Defining screens with activities
- Implementing designs in XML layouts