gradle / kotlin-dsl-samples

Samples builds using the Gradle Kotlin DSL
https://gradle.org/kotlin/
Other
3.71k stars 432 forks source link

Unresolved reference: android #1393

Closed linq8261 closed 4 years ago

linq8261 commented 4 years ago
plugins {
    id("com.android.application")
    kotlin("android")
    kotlin("android.extensions")
//    kotlin("kapt")
}

android {
}

my build.gradle.kts like this, but "Unresolved reference: android"

eskatos commented 4 years ago

Thanks for the report @audientlin

Please note that this repository, gradle/kotlin-dsl-samples is for Gradle Kotlin DSL samples only. For bug reports or feature requests, please open issues on https://github.com/gradle/gradle/issues For usage questions, please use the Gradle forums at https://discuss.gradle.org

That being said, the snippet you provided is not enough to understand what problem you are facing. I'm closing this issue, please use the forum for further questions.

MalcolmMcFly commented 4 years ago

@audientlin Did you ever solve this issue? I am experiencing the same problem

gkaradagan commented 4 years ago

i also have the same problem

Coronel-B commented 4 years ago

My solution: https://stackoverflow.com/a/60482635/5279996

AntoineGagnon commented 4 years ago

The solution in my case was to completely remove the android {} block, do a gradle sync, and then add it back.