Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Android Programming for Beginners

You're reading from   Android Programming for Beginners Build in-depth, full-featured Android 9 Pie apps starting from zero programming experience

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789538502
Length 766 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
John Horton John Horton
Author Profile Icon John Horton
John Horton
Arrow right icon
View More author details
Toc

Table of Contents (33) Chapters Close

Preface 1. Beginning Android and Java FREE CHAPTER 2. First Contact – Java, XML, and the UI Designer 3. Exploring Android Studio and the Project Structure 4. Getting Started with Layouts and Material Design 5. Beautiful Layouts with CardView and ScrollView 6. The Android Lifecycle 7. Java Variables, Operators, and Expressions 8. Java Decisions and Loops 9. Java Methods 10. Object-Oriented programming 11. More Object-Oriented Programming 12. The Stack, the Heap, and the Garbage Collector 13. Anonymous Classes – Bringing Android Widgets to Life 14. Android Dialog Windows 15. Arrays, ArrayList, Map and Random Numbers 16. Adapters and Recyclers 17. Data Persistence and Sharing 18. Localization 19. Animations and Interpolations 20. Drawing Graphics 21. Threads, and Starting the Live Drawing App 22. Particle Systems and Handling Screen Touches 23. Supporting Different Versions of Android, Sound Effects, and the Spinner Widget 24. Design Patterns, Multiple Layouts, and Fragments 25. Advanced UI with Paging and Swiping 26. Advanced UI with Navigation Drawer and Fragment 27. Android Databases 28. Coding a Snake Game Using Everything We Have Learned So Far 29. Enumerations and Finishing the Snake Game 30. A Quick Chat Before You Go Other Books You May Enjoy Index

Setting up Android Studio

Setting up Android Studio is quite straightforward, if a little time-consuming. Grab some refreshment and get started with the following steps:

  1. Visit developer.android.com/studio/index.html. Click the big green DOWNLOAD ANDROID STUDIO button to proceed:
    Setting up Android Studio
  2. Accept the terms and conditions by checking the checkbox, and then click the big blue button DOWNLOAD ANDROID STUDIO FOR WINDOWS:
    Setting up Android Studio
  3. When the download is complete, run the file you just downloaded. It has a name that starts android-studio-ide…, while the end of the name of the file will vary based on the current version at the time of reading.
  4. Click the Next > button to proceed:
    Setting up Android Studio
  5. Leave the default options selected, as shown in the following screenshot, and click the Next > button:
    Setting up Android Studio
  6. Next, we need to choose where to install Android Studio, as shown in the following screenshot:
    Setting up Android Studio

The install wizard recommends 500 MB of free space, but you probably noticed from the previous screen that 2.1 GB was suggested. However, there are even more requirements later in the install process. Furthermore, it is much easier if you have all your Android Studio parts, as well as your project files, on the same hard drive.

For these reasons, I recommend having at least 4 GB of free space. If you need to switch drives to accommodate this, then use the Browse... button to browse to a suitable place on your hard drive.

Tip

Note down the location you choose.

  1. When you are ready, click the Next > button.
  2. In this next window, you are choosing the folder in your start menu in which Android Studio will appear. Leave it at the default, as shown next:
    Setting up Android Studio
  3. Click Install. This step might take some time, especially on older machines or if you have a slow internet connection. When this stage is done, you will see the following screen:
    Setting up Android Studio
  4. Click Next >.
  5. Android Studio is now installed—kind of. Check the Start Android Studio checkbox and click the Finish button:
    Setting up Android Studio
  6. You will be greeted with the Welcome screen, as shown in the following screenshot:
    Setting up Android Studio
  7. Click the Next button.
  8. Choose Standard install type, as shown in the following screenshot:
    Setting up Android Studio
  9. Click the Next button.
  10. Choose whichever color scheme looks nice to you. I chose IntelliJ, as shown in the following screenshot:
    Setting up Android Studio
  11. Click Next.
  12. Now you will see the Verify Settings screen:
    Setting up Android Studio
  13. Click the Finish button. Android Studio will now commence some more downloads, which could take some time.
  14. When Android Studio is ready, you will have the option to run Android Studio. At this point, click the Finish button. Android Studio is most likely ready. You can leave it open if you are carrying straight on with the next section, or you can close it and then reopen it when instructed in the next section.

Final step – for now

Using your preferred file manager software, perhaps Windows Explorer, create a folder called AndroidProjects. Make it at the root of the same drive where you installed Android Studio. So, if you installed Android Studio at C:/Program Files/Android, then create your new folder at C:/AndroidProjects.

Or, if you installed Android Studio at D:/Program Files/Android, then create your new folder at D:/AndroidProjects.

Tip

Note that the screenshots in the next section show the AndroidProjects folder on the D: drive. This is because my C: drive is a bit full up. Either is fine. I did the install tutorial screen captures on a borrowed PC with plenty of space on the C: drive because that is the default for Android Studio. Keeping it on the same drive as the Android installation is neater and could avoid future problems, so do so if you can.

Notice that there is no space between the words Android and Projects, and that the first letter of both words is capitalized. The capitalization is for clarity and the lack of a space is required by Android Studio.

Android Studio and the supporting tools that we need are installed and ready to go. We are really close now to building our first app.

Now, let's look a little bit at the composition of an Android app.

You have been reading a chapter from
Android Programming for Beginners - Second Edition
Published in: Oct 2018
Publisher: Packt
ISBN-13: 9781789538502
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image