Google has announced the preview of Android KTX. It is a set of extensions designed to make writing Kotlin code for Android more concise, pleasant, and idiomatic. The company promises to provide a nice API layer on top of both Android Frameworks and Support library so as to make writing the Kotlin code more natural.

Google announced that Android officially supports the Kotlin programming language, in addition to Java and C++ at its I/O 2017 developer conference in May. Android studio 3.0 with Kotlin support was also followed in May. Presently it promises an API layer on top of the Android framework and support library. The former is available on GitHub. Google also promises to make the other parts of Android KTX that cover the Android Support Library will be available in upcoming Support Library releases.

The following should be added to the app module’s build.gradle file for using the Android KTX in an Android Kotlin projects:

  • repositories {
    dependencies {
    // Android KTX for framework API
    implementation ‘androidx.core:core-ktx:0.1’


After the project gets synced, the extensions will appear automatically in the IDE’s autocomplete list and to add them to the necessary import statement to the file we need to choose any of them.

Google alerts that the APIs are likely to change during the preview period. It warns the developers to not use it in their main Android projects as there are chances of changes before the stable version arrives. Google confirms that the preview launch is just the beginning. As soon as the API stabilizes and Google commits to API compatibility KTX will be released as a part of Android Support Library.

It is also brought to notice that Android KTX uses package names that begin with androidx. This is the new package name prefix that will be used in future versions of Android Support Library.

The difference between android. and androidx. is that which APIs are bundled with the platform and which are static libraries for app developers for different versions of Android.

Sign up for Newsletters

Subscribe to our newsletter and never miss an update on the latest tech, gaming, startup, how to guide, deals and more.

Reach our audience with your advertisements

Advertising on TechGenyz delivers results. Build your brand, increase website traffic, generate qualified leads, and drive action with our audience. Select the perfect advertising solutions for your brand.

Partner Now