Compilation error

PS C:\Users\DELL\Desktop\flutter\cd_calculator\android> ./gradlew build

Task :app:compileReleaseKotlin FAILED
e: file:///C:/Users/DELL/Desktop/flutter/cd_calculator/android/app/src/main/kotlin/com/example/cd_calculator/MainActivity.kt:3:8 Unresolved reference: io
e: file:///C:/Users/DELL/Desktop/flutter/cd_calculator/android/app/src/main/kotlin/com/example/cd_calculator/MainActivity.kt:5:21 Unresolved reference: FlutterActivity

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:compileReleaseKotlin’.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 3m 24s
50 actionable tasks: 28 executed, 22 up-to-date
PS C:\Users\DELL\Desktop\flutter\cd_calculator\android>

Show us your source code, or give us a link to your project, or something. Terminal output with no insight into your source code gives us nothing to work with. You won’t get any help without providing your source code or source project.

1 Like

Since the underlying errors seem to be Unresolved reference, I suspect the build.gradle file will be the most relevant.

1 Like