0

I'm pretty new to kolin. I am currently trying to start a activity for a result by using the registerForActivityResult API.

I tried the method given by this post. But when I run it in the main activity it results in Type mismatch: inferred type is android.app.Instrumentation.ActivityResult! but androidx.activity.result.ActivityResult! was expected. This looks like a false linking of the ActivityResult but idk.

My dependencies look like this:

    implementation 'androidx.core:core-ktx:1.10.1'
    implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0')
    implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
    implementation "androidx.activity:activity:1.7.2"
    implementation "androidx.fragment:fragment:1.6.0"
    implementation platform('androidx.compose:compose-bom:2022.10.00')
    implementation 'androidx.compose.ui:ui'
    implementation 'androidx.compose.ui:ui-graphics'
    implementation 'androidx.compose.ui:ui-tooling-preview'
    implementation 'androidx.compose.material3:material3'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
    androidTestImplementation platform('androidx.compose:compose-bom:2022.10.00')
    androidTestImplementation 'andr`oidx.compose.ui:ui-test-junit4'
    debugImplementation 'androidx.compose.ui:ui-tooling'
    debugImplementation 'androidx.compose.ui:ui-test-manifest'

Is there any fix for this mismaching?

If you need more information, I will sure provide.

Thanks in advance.

kabr8
  • 341
  • 1
  • 2
  • 19

1 Answers1

0

Please share more info about your activity class , what are the imports in activity and what is extended value in activity