Closed mhansen closed 4 months ago
Installing Kotlin and the Android SDK separately from Studio is the preferred way.
Just checking how to parse the 'separately'; do you mean install Kotlin from GitHub releases and Android SDK from Studio, or install both without using Studio? I'm guessing the first as you approved my PR.
Hi, love the tool. Want my team to use it! I had a bit of trouble figuring out the environment variables to set when running it; was a bit of trial-and error, so I thought I'd log an experience report about how it was to get started, and we could discuss how to make it easier.
My guess is most developers will have android sdk and kotlinc from Android Studio, so we could make setup easier by saying where Android Studio stores these?
README says:
OK, this wasn't too hard to find, I think I knew already this was in
~/Library
on my mac, but I still first tried~/Library/Android
before~/Library/Androi/sdk
worked. After a little trial and error, I got it.OK this one stumped me! First I thought, I might not have a Kotlin installation? So I went to the Kotlin website looking for a release, but I couldn't easily find one: they just say to use IntelliJ or Android Studio: https://kotlinlang.org/docs/getting-started.html#install-kotlin (edit: later on, I was able to find CLI releases: https://kotlinlang.org/docs/command-line.html).
Ultimately I got it working by setting
/Applications/Android\ Studio.app/Contents/plugins/Kotlin/kotlinc/
as myKOTLIN_HOME
, but that gave me an error thatkotlinc
was not executable, so I had tochmod +x kotlinc /Applications/Android Studio.app/Contents/plugins/Kotlin/kotlinc/bin/kotlinc
, then compiling in Kotlin Explorer worked.Now, the presence of the hacky
chmod
makes me think I'm not doing this right. Probably I should have installed kotlin following the instructions at https://kotlinlang.org/docs/command-line.html instead. So maybe let's link there from the README?Thanks, and I'm keen to help. I'll send a PR with some ideas.