-
Notifications
You must be signed in to change notification settings - Fork 88
Closed as not planned
Labels
Description
I'm using flutter stripe with the 100ms and here in the MainActivity it should be extended with the FlutterFragmentActivity but unexpectly I got the error
Launching lib/main.dart on sdk gphone arm64 in debug mode...
Running Gradle task 'assembleDebug'...
e: file:///Users/xyz/Downloads/seller_support_customer_app-new-branch-to-sultan/android/app/src/main/kotlin/com/rb/sellersuppportuser/MainActivity.kt:22:13 Unresolved reference: activity
e: file:///Users/xyz/Downloads/seller_support_customer_app-new-branch-to-sultan/android/app/src/main/kotlin/com/rb/sellersuppportuser/MainActivity.kt:27:13 Unresolved reference: activity
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> 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 14s
Exception: Gradle task assembleDebug failed with exit code 1
Here is my MainActicvity.kt file code.
package com.example.customer_app
import io.flutter.embedding.android.FlutterFragmentActivity
import android.app.Activity
import android.content.Intent
import android.content.res.Configuration
import android.util.Log
import io.flutter.embedding.android.FlutterActivity
import live.hms.hmssdk_flutter.Constants
import live.hms.hmssdk_flutter.HmssdkFlutterPlugin
import live.hms.hmssdk_flutter.methods.HMSPipAction
class MainActivity: FlutterFragmentActivity() {
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == Constants.SCREEN_SHARE_INTENT_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
data?.action = Constants.HMSSDK_RECEIVER
activity.sendBroadcast(data?.putExtra(Constants.METHOD_CALL, Constants.SCREEN_SHARE_REQUEST))
}
if (requestCode == Constants.AUDIO_SHARE_INTENT_REQUEST_CODE && resultCode == Activity.RESULT_OK){
data?.action = Constants.HMSSDK_RECEIVER
activity.sendBroadcast(data?.putExtra(Constants.METHOD_CALL, Constants.AUDIO_SHARE_REQUEST))
}
}
}
Reactions are currently unavailable