while running the flutter app i am getting this error

Viewed 264

Type mismatch: inferred type is Activity? but Activity was expected

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':jitsi_meet:compileReleaseKotlin'.

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.

2 Answers

If you have not added kotlin configuration, then plz add below line in android/build file

buildscript {
ext.kotlin_version = '1.6.10'
.
.
.

And also add classpath right as below:

dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10'
.
.
.

Could you be more specific on what and where is this problem happening. This error is telling you that the type expected is Activity instead of the nullable type Activity?.

Related