Getting started with Android and Kotlin

Android and Kotlin

At the Google I/O 2017 Google announced that the programming language Kotlin is now officially supported for Android app development using Android Studio.

Installing the Android Studio 3.0 and Kotlin Plugin

  • We must download and install Android Studio 3.0 at  developer.android.com (current version is 3.0.1)
  • Checking Kotlin plugin installed by selecting File > Settings

 

Easy program

package com.example.admin.myfirstkotlinapp

import android.support.v7.app.AppCompatActivity

import android.os.Bundle

import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : AppCompatActivity() {

override fun onCreate(savedInstanceState: Bundle?) {

super.onCreate(savedInstanceState)

setContentView(R.layout.activity_main)

message.text = "Hello My Kotlin App in Android Studio 3.0"

} }

Leave a Reply

Your email address will not be published. Required fields are marked *