古めのIntelliJ IDEAがAndroid Studioで使われている様子で、
IntelliJ IDEAを使おうがAndroid Studioを使おうが大差ないのかもだけども、
Androidの最新の動向をトレースできるのはきっとAndroid Studio。
以下の記事を順当に流してとりあえずKotlin Android Hello World環境ができた。
IntelliJ IDEAで、JavaSDK,AndroidSDK,Android support plugin,Gradle pluginの設定をするのは順当。
参考にしたやつ。
https://qiita.com/shitake/items/150d7a94b66ba73a93ba
https://qiita.com/g0z4ru/items/24bca8e6fb691f29260f
今日現在、ext.kotlin_versionがデフォの1.3.0だといろいろ見つからないと言われるので1.2.71に設定。
// build.grade
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.71' // change from 1.3.0 to 1.2.7
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
MainActivity.kt。ちゃんとKotlinになってる。
5年前くらいにAndroidアプリを開発していたころと同じMacで作業しているのだけども、
エミュレータが遅いのは相変わらずな以外は、意外にもモッサリしていない。
当時はEclipse、今はIntelliJ IDEA(Android Studio)。
割と2013LateのMBPで何かやろうとする気になる。
サンプルをビルドするだけでなくて、
何か簡単なアプリを1つ作ってみよう..。