When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works.

Google has made the Android Pie SDK more Kotlin-friendly

Those who use the Kotlin programming language - especially in Android development - instead of traditional Java are well aware of the advantages it offers over the latter. These benefits include null-safety and more concise code, among many others. Android developers who use Kotlin will be pleased to know that with the announcement of Android 9 Pie a couple of days ago, Google has also released an SDK which is more Kotlin-friendly.

In a new blog post, Google has noted that it has added nullability annotations for some of the most popular APIs to guarantee null-safety if your code calls them. Nullability contract violations in your Kotlin code normally produce compilation errors, but Google is giving developers some time to update their code in accordance with the newly updated APIs. As such, in the case of violations, the compiler will only give a warning instead of giving an error, allowing the mechanism to be more developer-friendly.

You will need to use Kotlin 1.2.60 to take advantage of these features, and you can find out how to use this new SDK by referring to Google's blog post. Moving forward, the company has announced that it will be annotating all remaining APIs and that it will make sure that new ones are annotated as well.

Report a problem with article
Next Article

EU pushes forward to unify mobile phone chargers

Previous Article

Surface Pro 3 gets an update to improve security

Join the conversation!

Login or Sign Up to read and post a comment.

0 Comments - Add comment