https://kotlinlang.org logo
#android
Title
# android
m

Madhan

04/27/2020, 2:54 PM
Hi all, Today i tried to convert my build.gradle into build.gradle.kts. I followed kotlin DSL syntax, but my android { <-- shows error ... } --------------- this is my project level build file
Copy code
classpath("com.android.tools.build:gradle:3.6.3")
 classpath(kotlin("gradle-plugin", version = "1.3.72"))
In my app module. android block not getting recognised. Can any one help me out this?
v

Vincent Williams

04/27/2020, 4:17 PM
did you apply the android library plugin?
m

Madhan

04/28/2020, 6:29 AM
@Vincent Williams Yes, I have applied android and android-extension in my app module. like this
plugins {
kotlin("android")
kotlin("android.extension")
}
but still my android block was not recognized.
v

Vincent Williams

04/28/2020, 1:15 PM
you need
com.android.application
or if its a library module
com.android.library
m

Madhan

04/28/2020, 2:56 PM
I added that too. after adding this line I rebuild my project but still error remains
v

Vincent Williams

04/28/2020, 9:24 PM
try cleaning the cache and restarting
also it should be
id("com.android.application"
not
kotlin("com.android.application")
m

Madhan

04/29/2020, 1:14 PM
okay will try