question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot build the source file

See original GitHub issue

When 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:open
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
minminayacommented, Dec 8, 2021

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

compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }
    kotlinOptions {
        jvmTarget = "11"
        freeCompilerArgs = freeCompilerArgs + "-Xopt-in=kotlin.RequiresOptIn"
    }

0reactions
joelc1225commented, Nov 22, 2021

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****

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot build and debug because the active file is not a C or ...
I take error . " Cannot build and debug because the active file is not a C or C++ source file. The terminal...
Read more >
Compiling source file won't recompile module
A single file compilation (Ctrl+F7) can only build files within one project, it cannot build files in different projects, as in the repro....
Read more >
the project was not build since the source file could not be read
Save this question. Show activity on this post. I tried everything I found, Refresh > Clean > build / Restart > refresh >...
Read more >
Visual Studio 2019 Cannot build solutions that are in custom ...
Just to be clear though, you need to have a solution and project to do this. If you're simply trying to open a...
Read more >
Error "can not open source file" occur in UE5 build in class - AI
This is UE build in class Character, the soucre files are not found in Character.cpp file. when I try to open someone(CapsuleComponent.h) of ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found