Book Image

Android 9 Development Cookbook - Third Edition

By : Rick Boyer
Book Image

Android 9 Development Cookbook - Third Edition

By: Rick Boyer

Overview of this book

The Android OS has the largest installation base of any operating system in the world. There has never been a better time to learn Android development to write your own applications, or to make your own contributions to the open source community! With this extensively updated cookbook, you'll find solutions for working with the user interfaces, multitouch gestures, location awareness, web services, and device features such as the phone, camera, and accelerometer. You also get useful steps on packaging your app for the Android Market. Each recipe provides a clear solution and sample code you can use in your project from the outset. Whether you are writing your first app or your hundredth, this is a book that you will come back to time and time again, with its many tips and tricks on the rich features of Android Pie.
Table of Contents (24 chapters)
Title Page
Copyright and Credits
Dedication
About Packt
Contributors
Preface
Index

How to create an Android project with Kotlin


Developing in Kotlin couldn't be easier! As you'll see from the simple step here, full Kotlin support is already built into the Android Studio IDE.

Getting ready

Kotlin support requires Android Studio 3.0 or later, so there are no additional requirements needed for this recipe or any of the recipes in this chapter.

How to do it...

It's actually very simple to add Kotlin support to an Android project and you may have noticed the checkbox already. When creating a new project, Android Studio gives you an option. In fact, it's so obvious, you may not even notice it anymore so we'll start at the beginning and show a screenshot. To begin, launch Android Studio and click Start a new Android project:

  1. In the Create Android Project dialog, click the Include Kotlin support checkbox, as shown here:
  1. That's it! Click through the remaining dialogs and you'll have your first Kotlin project for Android.

How it works...

The IDE already handles everything you need to do...