Book Image

Mastering Android Development with Kotlin

By : Miloš Vasić
Book Image

Mastering Android Development with Kotlin

By: Miloš Vasić

Overview of this book

Kotlin is a programming language intended to be a better Java, and it's designed to be usable and readable across large teams with different levels of knowledge. As a language, it helps developers build amazing Android applications in an easy and effective way. This book begins by giving you a strong grasp of Kotlin's features in the context of Android development and its APIs. Moving on, you'll take steps towards building stunning applications for Android. The book will show you how to set up the environment, and the difficulty level will grow steadily with the applications covered in the upcoming chapters. Later on, the book will introduce you to the Android Studio IDE, which plays an integral role in Android development. We'll use Kotlin's basic programming concepts such as functions, lambdas, properties, object-oriented code, safety aspects, type parameterization, testing, and concurrency, which will guide you through writing Kotlin code in production. We'll also show you how to integrate Kotlin into any existing Android project.
Table of Contents (24 chapters)
Title Page
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Downloading and configuring Android Studio


To develop our application, we will need some tools. First of all, we will need an IDE. For that purpose, we will use Android Studio. Android Studio provides the fastest tools to build apps on every type of Android device.

Android Studio offers professional code editing, debugging, and performance tooling. It's a flexible build system that allows you to focus on building a top quality application.

Setting up Android Studio takes just a few clicks. Before we go any further, you need to download the following version for your operating system:

https://developer.android.com/studio/index.html

Here are the instructions for macOS, Linux, and Windows:

macOS: To install it on macOS, follow these steps:

  1. Launch the Android Studio DMG file.
  2. Drag and drop Android Studio into the Applications folder.
  3. Launch Android Studio.
  4. Select whether you want to import previous Android Studio settings.
  5. Click on OK.
  6. Follow the instructions until Android Studio is ready for use.

Linux:To install it on Linux, follow these steps:

  1. Unpack the archive you downloaded to an appropriate location for your applications.
  2. Navigate to bin/directory/.
  3. Execute /studio.sh.
  4. Select whether you want to import previous Android Studio settings or not.
  5. Click on OK.
  6. Follow the instructions until Android Studio is ready for use.
  7. Optionally, select Tools | Create Desktop Entry from the menu bar.

Note

If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386 In case you are running a 64-bit Fedora, the command is follows:sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686

Windows:To install it on Windows, follow these steps:

  1. Execute the .exe file you downloaded.
  2. Follow the instructions until Android Studio is ready for use.