The exercise files in this course are organized by chapter. The sample apps for Chapters 1–5 were created with an older version of Android Studio, while the apps in the new Chapter 6 require Android Studio 3 or later.
- [Instructor] This course is accompanied by exercise files that you can use to follow along with the demonstrations on the screen. I've copied the exercise files to my desktop, but you can place them anywhere on your hard disk. The exercise files are organized by chapter, with one direct route for each chapter and then subdirectories for each video. Within those subdirectories, you'll find directories that are constructed as Android Studio projects. You can recognize the projects by the inclusion of iml files, those are configuration files, gradle and app subdirectories, and a .idea directory that's visible on Windows but hidden on Mac.
In order to use any of these projects, open the appropriate version of Android Studio. For the earlier chapters, through Chapter 5, you can use Android Studio 2.3.3 or later. From the Welcome screen, click Open an Existing Android Studio Project, then jump to the Desktop directory. On Windows, you can press Control D and on Mac, Command D. Then open the exercise files directory and navigate to the chapter and video directory you're interested in. The Android Studio Project Directory should be marked by the icon.
Click on it, then click OK and the project should open. If you're using a version of Android Studio more recent, you might be prompted to update your gradle plugin and other associated libraries. If you see those prompts, just accept them. And I'll show you an example of that in a moment. Once you've opened the project, you can go to the project window, and then go to the App module, then to Java and you'll find all of the Java classes there.
The projects that are included for Chapter 6, the new chapter I'm working with Java 8 are designed for use with Android Studio 3 or later. I'll open a copy of Android Studio, which I've copied to my desktop. This is an early preview version of Android Studio. In this video, I'm using Android Studio Canary 9. Most of Chapter 6 was recorded with Canary 6. So we'll get a chance to see what happens when you're using a more recent version of the IDE.
As before, I'll go to the Welcome screen and choose Open an Existing Android Studio Project. I'll jump to the Desktop Directory and to Exercise Files. And then I'll go to Chapter 6. And to one of the directories within Chapter 6. And I'll choose the Android Studio Project and open it. Now again, I originally recorded this with Android Studio 3 Canary 6 and now I'm in a more recent version. And I'm prompted to update the Gradle Plugin.
I click update and then if I see any other prompts to fix the Gradle wrapper, or to update various components, I'll accept them. If this is the first time you've gone through any of these steps for any particular version of Gradle or SDK components, it might take a little time to download all of the components, but it'll all happen automatically. And once the Gradle build process is done, and you can tell that by watching the bottom of the screen, you will be ready to use your application and test it on a physical or a virtual device.
In addition to the beginning Exercise Files, there are solution versions of all of the Exercise Files under the Solutions directory. Once again, there are directories for each chapter and each video. And you can open them in Android Studio in exactly the same way.
Watch these Java tutorials to learn smarter, more efficient methods for Android app development.
- Preparing the development environment
- Packaging and running Android apps
- Optimizing Java code for Android
- Implementing event handler interfaces
- Defining custom callback methods
- Working with the Android SDK's Java packages
- Storing data
- Reading text files
- Parsing JSON and XML data
- Managing device sensors
- Playing audio