Skip to content

What are the implications and why is it so important?

26 mayo, 2021

The bets for the present Google IO 2017 do not favor the announcement that Google would give definitive support to Kotlin on Android. We had become used to Google avoiding any official statement, although veiled many of the company’s prominent developers fervently supported it. But it has finally happened, and Kotlin is an official language on Android at the same level as Java. !! Congratulations!!

This implies the possibility of working with a more modern and robust programming language, which will allow you to gradually forget the limitations of the mandatory use of Java 6 on Android. Be careful, being able to interoperate with Java and current libraries without problem. And without the fear of losing support on Android.

What’s more, Google and Jetbrains will work side by side in the support of tools for developers, the first the support directly from Kotlin in Android Studio 3.0, is already announced.

Where does Kotlin come from?

Kotlin it began to develop almost 6 years ago from the hand of Jetbrain, the company responsible for IntelliJ, the IDE on which Android Studio is based. His initial idea was to replace Java in the projects developed by the company. Relying on the JVM was critical to being fully interoperable with Java and its ecosystem.

The Kotlin principles are:

  • Simple and pragmatic. It should be a powerful language as well as easy to use. The learning curve is considerably lighter than other languages ​​like Scala, for example. What supports its adoption.
  • It is 100% interoperable with Java. Any code written in Java can be used directly from Kotlin.
  • For Android to adopt it, the language had to be lightweight to run on any device without exceeding the specific weight of APKs on Android.

At the end of 2015, the first beta of version 1.0 was published, although some projects were already being worked on, this certified that the thing was serious and could be used in the near future in a production project. The final version arrived just a year ago.

Kotlin 1 1

But the work did not stop there, but Kotlin has evolved to version 1.1 that allows it to be independent if we want from the JVM. Being able to develop JS through Kotlin JS or even make applications for iOS with Kotlin / Native. Which implies that Kotlin is a language that can go much further than Android.

During this time, Google has been able to calmly test the language and has seen the community grow around Kotlin which ensured a sure success when the news was announced.

Kotlin supported by Android, but what does that imply?

Kotlin has no detrimental impact on performance and respects the proper size of APKs

Any developer who has followed the Kotlin journey and tried to “sell” the use of Kotlin internally in their company has in most cases encountered the reluctance of their managers. The typical excuse that Kotlin is not supported by Google is dispelled with this announcement giving the green light to projects in production.

Both Google and Jetbrain have made this pretty clear from the start by creating a Kotlin FAQ.

Among the main clarifications is the impact it will have on the daily development of Android and its tools. As we have already seen in a short video, the Canary version of Android Studio 3.0 that fully supports Kotlin is already ready, no need to install any additional Kotlin plugins, as has been happening up to now.

Of course, create a project entirely in Kotlin, convert Java code to Kotlin, debug Kotlin and whatever else has been done with Java. In addition to the recently announced review of the performance of the apps from the IDE itself.

As we discussed earlier, Kotlin is fully interoperable and we can call any Android API as if it were Java. Even if we work with C ++ we can use JNI with Kotlin in the same way.

Concerns at the application performance level in Kotlin are also recurring. They explain that Kotlin have no impact about this, and it behaves just like Java does.

The typical excuse that Kotlin is not supported by Google is dispelled with this announcement giving the green light to projects in production.

There is no problem in the minimum versions of Android that will be able to support this improvement with Kotlin, since it is compatible with JDK 6, as we said before, and it will be able to run on old versions of Android without problem.

Also the relationship between Google and Jetbrain has been clarified that will be closer on this matter, including the creation of a non-profit foundation to support Kotlin and its profitable future. Both at the level of language, framework or any tool. Let’s hope, in fact, that Android in general is reinforced in that sense with the inclusion of a company with Jetbrain that takes care of its products to the smallest detail.

Curious that the CEO of Jetbrain had to clarify that they are not thinking of being bought by Google. We must remember that the company already has a profitable business model and that its presence in the developer ecosystem is wide and they want to remain independent. This agreement only implies a collaboration between Google and Jetbrain to improve the Android ecosystem with Kotlin, as it was already doing with the development IDE.

How to learn Kotlin

Whether you are a newbie developing applications or if you have been working on Android for some time, you can take a look at the Kotlin development guides. The learning curve is much lighter if you already come from the Java environment but it is not strictly necessary to have previous knowledge.

During the sessions this Friday at Google IO 2017, several of the language development members will give talks on how to get started with it and how to take advantage of it, which can be followed by streaming and its subsequent video on YouTube.

If you want to delve into the world of Kotlin there are currently two recommended books. It seems that the surprise of the announcement has caught them off guard but you can still get a copy of them: Kotlin for Android Developers by Antonio Leiva and Kotlin in Action by Dmitry Jemerov and Svetlana Isakova (Author).

The future of Kotlin with the new ecosystem expected ** of Android

Kotlin may be the future, even forgetting Java and the JVM with the new thing that Google is developing. Fucshia and Andromeda are an opportunity for Kotlin too

2017 has already started with a lot of buzz around Kotlin. One of the main points has already been achieved: Google’s clearly favorable positioning over Kotlin. This will exponentially grow their penetration, as developers are still stuck in the past with Java 6, Kotlin represents fresh air and the use of functional programming in Android.

Even so we need more success stories on Android with KotlinSee large companies that are already using it intensively to remove the fear of small and medium-sized companies dedicated to the development of Android. We recently saw an excellent post from the people of Basecamp on how to make an app 100% in Kotlin, we still need more examples.

Fuchsia

What happened to FuchsiaOS and Andromeda? No mention in the Google IO. Before the start of the keynote, many even They were betting on a more powerful ad taking Android to another level with a total renovation based on a kernel other than Linux. The language was left in the air, some spoke of Dart but now perhaps Kotlin is not a crazy idea to continue a native Kotlin development on Android, without the JVM. Kotlin already has native projects.

Maybe in the medium term we will end up 100% eliminating Java working on the new Google operating system that makes Android and Chrome interoperable. Kotlin may be the continuity bet by leading developers to progressive adoption. Dart does not finish curdling.

Without a doubt, quite interesting things await us, the spirits in Android developers are very renewed.

In Engadget Android | Google I / O 2017: all the news announced in Mountain View