Wednesday, October 9, 2019

Android Studio incorrectly reformats Kotlin buildscripts

In the assignment they're currently working on, I saw some students create an activity in Android Studio and then receive script compilation errors in the project. The starter code we gave them contains a Kotlin DSL Gradle script which was altered by Android Studio when the activity was added. Strangely, the exclamation mark in !in was moved before the preceding space, making it invalid Kotlin. Reverting that change and doing a Gradle sync fixed the problem.

No comments:

Post a Comment