cannot build the source file
See original GitHub issueWhen I download, open this project and run, I got this error. AGP : 7.0.0 Gradle : 7.0 gradle plugin : 1.5.21
I think this is a problem of dsl, but don’t know what to do.
e: /Users/user/Desktop/ComposeCookBook-master/buildSrc/src/main/kotlin/common-compose-module-configs-script-plugin.gradle.kts: (8, 1): Expression 'android' cannot be invoked as a function. The function 'invoke()' is not found e: /Users/user/Desktop/ComposeCookBook-master/buildSrc/src/main/kotlin/common-compose-module-configs-script-plugin.gradle.kts: (8, 1): Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: internal val ComPluginGroup.android: ComAndroidPluginGroup defined in gradle.kotlin.dsl.plugins._a477e4bb38b5f342e70f4eed110d6eb4 in file PluginSpecBuilders.kt internal val OrgJetbrainsKotlinPlatformPluginGroup.android: PluginDependencySpec defined in gradle.kotlin.dsl.plugins._a477e4bb38b5f342e70f4eed110d6eb4 in file PluginSpecBuilders.kt internal val OrgJetbrainsKotlinPluginGroup.android: PluginDependencySpec defined in gradle.kotlin.dsl.plugins._a477e4bb38b5f342e70f4eed110d6eb4 in file PluginSpecBuilders.kt internal val PluginDependenciesSpec.android: PluginDependencySpec defined in gradle.kotlin.dsl.plugins._a477e4bb38b5f342e70f4eed110d6eb4 in file PluginSpecBuilders.kt
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
AS-version:Android Studio Bumblebee 2021.1.1 Beta4
change sourceCompatibility and targetCompatibility to JavaVersion.VERSION_11 and change jvmTarget to “11” has fix this issue
Same error on latest Chipmunk Canary
Android Studio Chipmunk | 2021.2.1 Canary 5 Build #AI-212.5457.46.2112.7905983, built on November 11, 2021 Runtime version: 11.0.12+0-b1504.28-7817840 x86_64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 11.6 GC: G1 Young Generation, G1 Old Generation Memory: 1280M Cores: 16 Registry: external.system.auto.import.disabled=true****