Kotlin compilation error: compileDebugKotlin — what to do?
Hi everyone! I just started learning Kotlin for Android and encountered a problem when building the project. Gradle throws an error:
```
Error:Execution failed for task ':app:compileDebugKotlin'.
> Compilation error. See log for more details
```
I've searched through all of Stack Overflow, but didn't find a clear solution. I created the project via Android Studio with the Empty Activity template. The code is simple — just outputting "Hello, World!" in a TextView.
Here is my `build.gradle` (Module: app):
```kotlin
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
android {
namespace = "com.example.myapp"
compileSdk = 34
defaultConfig {
applicationId = "com.example.myapp"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
No answers yet.
Log in to leave an answer